Skip to content

fix(deps): update dependency org.tomlj:tomlj to v2 - #156

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/major-tomlj.version
Open

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/major-tomlj.version

Conversation

@renovate

@renovate renovate Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
org.tomlj:tomlj 1.3.0 → 2.2.0 age confidence

Release Notes

tomlj/tomlj (org.tomlj:tomlj)

v2.2.0

Compare Source

TomlJ is a parser and serializer for Tom's Obvious, Minimal Language (TOML).

Changes since last release

  • TomlJ runs on Java 8 again. Releases 1.2.0 through 2.1.1 were compiled for Java 9, which was never intended (#​150).
  • TomlParseOptions.sourceless() is shorthand for TomlParseOptions.defaults().withoutSource(), the options for a document that is read but not written back.

Getting TomlJ

TomlJ is published to Maven Central.

To include using Gradle, add the following to your dependencies:

implementation 'org.tomlj:tomlj:2.2.0'

To include using Maven:

<dependency>
  <groupId>org.tomlj</groupId>
  <artifactId>tomlj</artifactId>
  <version>2.2.0</version>
</dependency>

If your project already uses ANTLR and you would rather share one copy of the runtime, use org.tomlj:tomlj-antlr:2.2.0 instead.

You may also download the jars directly and include them in your project.

Usage and Documentation

For basic usage, please see the README. The examples directory has twelve small programs using TomlJ, from reading a file and reporting its errors to editing and writing documents, reading their comments, and binding them to records. Complete documentation, in Javadoc, is available here: http://tomlj.org/docs/java/2.2.0/

Signature

All artifacts and release tags are signed by Chris Leishman, using key id 0xB5A9E81B565E89E0.

v2.1.1

Compare Source

TomlJ is a parser and serializer for Tom's Obvious, Minimal Language (TOML).

2.1.1 is a bug-fix release.

Changes since last release

  • Binding no longer keeps TomlJ's class loader from being unloaded, so an application that bundles TomlJ can be unloaded on redeploy.
  • Fixes in binding: a float too small to hold a value is reported as out of range, a sorted set of a type that is not Comparable gives a clear error, and a GenericType subclass of another generic class names the right type.
  • Errors when writing objects now say "Cannot write", and name a JDK class correctly.
  • Fixes in writing edited documents, where a copied table or a comment could be written so that it read back differently.

Getting TomlJ

TomlJ is published to Maven Central.

To include using Gradle, add the following to your dependencies:

implementation 'org.tomlj:tomlj:2.1.1'

To include using Maven:

<dependency>
  <groupId>org.tomlj</groupId>
  <artifactId>tomlj</artifactId>
  <version>2.1.1</version>
</dependency>

If your project already uses ANTLR and you would rather share one copy of the runtime, use org.tomlj:tomlj-antlr:2.1.1 instead.

You may also download the jars directly and include them in your project.

Usage and Documentation

For basic usage, please see the README. The examples directory has twelve small programs using TomlJ, from reading a file and reporting its errors to editing and writing documents, reading their comments, and binding them to records. Complete documentation, in Javadoc, is available here: http://tomlj.org/docs/java/2.1.1/

Signature

All artifacts and release tags are signed by Chris Leishman, using key id 0xB5A9E81B565E89E0.

v2.1.0

Compare Source

TomlJ is a parser and serializer for Tom's Obvious, Minimal Language (TOML).

2.1.0 adds binding between TOML documents and Java objects, in both directions, and three options for the default writing style.

Changes since last release

Binding to Java objects
  • TomlTable.as and TomlArray.as bind a table or an array to a Java record, class, collection, map or array, given as a Class or, for a generic type, a GenericType. Each value is converted to the type declared for it. Toml.parseAs parses a string or a file and binds it in one call; a document with parse errors throws TomlParseException and is not bound.
  • A key binds to the record component or field of the same name, to another style of name with TomlBindOptions.withKeyNaming, or to the key given by @TomlName, which also names enum constants.
  • A missing key leaves an Optional empty and a field of a class at its initial value, and is otherwise null, or an error for a primitive, a component or field annotated NonNull, or one in a JSpecify @NullMarked scope. A key that names nothing is an error unless withUnknownKeysIgnored(true).
  • Every error is reported at once in a TomlBindException, each TomlBindError with its path, position and the exception that caused it, if any.
  • withConverter binds other types, such as Duration.
  • See docs/binding.md.
Writing Java objects
  • MutableTomlTable.from and MutableTomlArray.from write an object as a new table or array, and Toml.toToml writes it as a document.
  • update writes an object into an existing document and changes only what differs. A value that binds to the new one, or writes the same, is left as it was written; a replaced string or integer keeps its notation where the new value allows it; an array keeps the elements it already holds, with their comments.
  • TomlValue.inNotationOf gives a value in the notation of the value it replaces, for use with the editing API.
  • withConverter(type, read, write) also writes a converted type.
Writing options
  • TomlWriteOptions.withEntriesAlignedWithHeaders(true) indents a table's entries like its header, instead of one level beyond it.
  • withSpaceInsideArrays(true) writes an array that fits on one line with a space inside each bracket, [ 8001, 8002 ], matching the spacing of an inline table.
  • withBlankLineBetweenNestedHeaders(false) writes a header that directly follows the header of a table containing it on the next line, with no blank line between them.
Fixes
  • A table inserted at the start of an array of tables in a parsed document was written after the last line of the array's parent, possibly after other tables, so reading the output back put it last. It is now written before the array's first table.
  • When an edit made a line or header be written anew, the comment after it was kept but its spacing was not: the writer put the default two spaces before it. The spacing is now kept.
  • TomlPosition is now Serializable, so a TomlParseError can be serialized; it threw NotSerializableException.

Getting TomlJ

TomlJ is published to Maven Central.

To include using Gradle, add the following to your dependencies:

implementation 'org.tomlj:tomlj:2.1.0'

To include using Maven:

<dependency>
  <groupId>org.tomlj</groupId>
  <artifactId>tomlj</artifactId>
  <version>2.1.0</version>
</dependency>

If your project already uses ANTLR and you would rather share one copy of the runtime, use org.tomlj:tomlj-antlr:2.1.0 instead.

You may also download the jars directly and include them in your project.

Usage and Documentation

For basic usage, please see the README. The examples directory has twelve small programs using TomlJ, from reading a file and reporting its errors to editing and writing documents, reading their comments, and binding them to records. Complete documentation, in Javadoc, is available here: http://tomlj.org/docs/java/2.1.0/

Signature

All artifacts and release tags are signed by Chris Leishman, using key id 0xB5A9E81B565E89E0.

v2.0.1

Compare Source

TomlJ is a parser and serializer for Tom's Obvious, Minimal Language (TOML).

The 2.x line adds:

  • Comments in the model. Every comment in a document is parsed, and either attached to the entry it describes or kept with the table or array it was written in.
  • Building and editing documents. Tables and arrays can be built in code, and a parsed document can be changed in place: entries set, removed or inserted next to another, and comments edited.
  • Writing that keeps the source. toToml() writes a document identical to the parsed source except where it was edited: comments, blank lines, key order, indentation and the notation of each value (0xFF, 'literal', { a = 1 }) stay as they were written. A document can also be written in a default style, for TOML 1.1.0 or 1.0.0.
  • A jar with no dependencies. org.tomlj:tomlj carries its own relocated copy of the ANTLR runtime, and org.tomlj:tomlj-antlr is the same library for projects that already use ANTLR.

It is a major version because it removes TOML 0.4.0 and 0.5.0 support and changes what org.tomlj:tomlj contains; see the note for existing users below.

Changes since last release

Comments
  • Every comment in a document is parsed into the model. A run of comment lines directly above an entry, and a comment after it on the same line, are attached to that entry and read with comments(key) or comments(index). Every other comment is unattached and belongs to the table or array it was written in.
  • elements() on TomlTable and TomlArray walks the entries and unattached comments in the order they were written. entry(key) and entry(index) return one entry, as a TomlKeyValue or TomlEntry, with its value, comments and position.
  • See docs/comments.md.
Building and editing documents
  • MutableTomlTable and MutableTomlArray add setters, removal and insertion to TomlTable and TomlArray. A table or array is built with create(), and the result of Toml.parse is itself a MutableTomlTable, so a document can be parsed, changed and written out again.
  • set and add put a new entry after the last element; insertBefore and insertAfter place one next to an existing entry or comment. Inserting a key that is already set throws the new TomlKeyAlreadySetException.
  • Comments are edited by placement: the run above an entry, the comment after it, and the unattached comments of a table or array.
  • TomlValue.parse reads one value from its TOML text, and TomlValue.hex, octal, binary, grouped, literal and multilineLiteral make a value written in a chosen notation. createInline() makes a table or array written inline on its entry's line.
  • See docs/editing.md.
Writing TOML
  • toToml() on a parse result copies the text the document was parsed from, so an unedited document comes back byte for byte, and an edit changes only the lines it touches.
  • TomlWriteOptions sets how much is kept with keep(Keep): LAYOUT (the default) keeps every line, blank line and comment as written; NOTATION keeps the form each key, value and table was written in, such as 0xFF or 'literal', and lays out the lines in the default style; NOTHING writes the whole document in the default style.
  • The default style writes comments, splits a long array (and, for TOML 1.1.0, a long inline table) over lines at withMaxLineWidth, and indents with withIndent.
  • withVersion names the TOML version written for. Writing for 1.0.0 throws IllegalArgumentException where the document needs a construct only 1.1.0 allows, naming the construct and where it was written.
  • Keeping the source text costs about 40% more heap for a parsed document; TomlParseOptions.defaults().withoutSource() parses without it.
  • See docs/writing.md.
Fixes
  • keyPathSet, dottedKeySet and toMap() list keys in document order, as keySet and the entry sets already did, where they listed them in hash order.
  • toJson writes NaN and infinity as null, since JSON has no literal for them. It wrote nan, +inf and -inf, which is not JSON. With ALL_VALUES_AS_STRINGS they are still written as the strings "nan", "+inf" and "-inf".
  • An unclosed array or inline table followed by a comment or a blank line lost the rest of the document. The lines after it are now parsed, and the error is reported at the end of the value's last line.
  • An error ending an unclosed array or inline table no longer lists a newline among what was expected, and an error after a comma names the value or key that may follow it: foo = [1, @] reports "Unexpected '@​', expected ], a value, or a newline".
  • Compiling against the jar without checker-qual on the classpath made javac warn about an unknown enum constant TypeUseLocation, which failed builds using -Werror. The annotations that caused it are gone.
  • A table opened by a dotted key in a document's last section now has a position, as it does in any other section.
Note for existing users
  • org.tomlj:tomlj is now a single jar with no dependencies: it carries its own copy of the ANTLR runtime, relocated under org.tomlj.internal.antlr. The all classifier is gone. A project that relied on TomlJ to bring antlr4-runtime onto its classpath now needs to declare it, or use the new org.tomlj:tomlj-antlr, which is the same library depending on antlr4-runtime instead of bundling it.
  • TomlVersion.V0_4_0 and V0_5_0 are removed. Every document that parsed under them parses identically at V1_0_0.
  • The deprecated TomlArray.containsStrings() and the nine methods like it are removed.
  • get, inputPositionOf and comments throw TomlInvalidTypeException when a key on the path before the last is not a table, as documented, where they returned null.
  • toToml() output changes: a parsed document is written as its source text, and comments are written.
  • TomlTable and TomlArray gain abstract methods (entry and elements), so a class implementing either needs to supply them.

Getting TomlJ

TomlJ is published to Maven Central.

To include using Gradle, add the following to your dependencies:

implementation 'org.tomlj:tomlj:2.0.1'

To include using Maven:

<dependency>
  <groupId>org.tomlj</groupId>
  <artifactId>tomlj</artifactId>
  <version>2.0.1</version>
</dependency>

If your project already uses ANTLR and you would rather share one copy of the runtime, use org.tomlj:tomlj-antlr:2.0.1 instead.

You may also download the jars directly and include them in your project.

Usage and Documentation

For basic usage, please see the README. The examples directory has seven small programs using TomlJ, from reading a file and reporting its errors to editing and writing documents and reading their comments. Complete documentation, in Javadoc, is available here: http://tomlj.org/docs/java/2.0.1/

Signature

All artifacts and release tags are signed by Chris Leishman, using key id 0xB5A9E81B565E89E0.

v2.0.0

Compare Source

v1.3.1

Compare Source

TomlJ is a parser for Tom's Obvious, Minimal Language (TOML).

1.3.1 is a bug-fix release for the 1.x line.

Changes since last release

  • TomlJ runs on Java 8 again. Releases 1.2.0 and 1.3.0 were compiled for Java 9, which was never intended (#​150).

Getting TomlJ

TomlJ is published to Maven Central.

To include using Gradle, add the following to your dependencies:

implementation 'org.tomlj:tomlj:1.3.1'

To include using Maven:

<dependency>
  <groupId>org.tomlj</groupId>
  <artifactId>tomlj</artifactId>
  <version>1.3.1</version>
</dependency>

You may also download the jars directly and include them in your project.

Usage and Documentation

For basic usage, please see the README. Complete documentation, in Javadoc, is available here: http://tomlj.org/docs/java/1.3.1/

Signature

All artifacts and release tags are signed by Chris Leishman, using key id 0xB5A9E81B565E89E0.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/major-tomlj.version branch from 170a89c to ab65854 Compare September 30, 2026 02:43
@renovate
renovate Bot force-pushed the renovate/major-tomlj.version branch from ab65854 to c29fc84 Compare October 4, 2026 00:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants