21.0.1 #180
abashev
announced in
Announcements
21.0.1
#180
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This is the first release of open-java-format that stands on its own. Up to 2.98.0.6 the version was palantir-java-format's with a build number appended; once the bug fixes made the output differ from upstream, that numbering lost its meaning. The version now follows this project alone:
<java>.<minor>.<build>. The first number is the Java version the formatter is built for, 21. The second moves with every change to the output, the third with fixes that leave the output alone. See Versions.21.0.0 reached Maven Central, the Gradle Plugin Portal and the JetBrains Marketplace, but its GitHub release failed (#179). 21.0.1 formats exactly as 21.0.0 does, and these notes cover both.
The output differs from 2.98.0.6, so take this release with one reformatting run, in a commit of its own.
From google-java-format
/* ... */comment left on the line of an opening brace no longer lands one indent too deep, only for the next run to move it back (google/google-java-format#1464 by Tanvir Alam, for google/google-java-format#1260; #143).for (, the(of a try with several resources,assertwith a detail message or the;after enum constants, is indented as a continuation, and so is the code after it; both used to land at the indent of the statement. google-java-format fixed the same defect in its new layout builder (google/google-java-format#1501); its code does not apply here, its idea does (#175).valuemodifier is recognized and put in order, whilevalue,sealedandnonstay identifiers where they are names. A lambda parameter namedsealedornonno longer fails to parse (1959806 by Liam Miller-Cushon; #141).Javadoc formatting, which only the
formatJavadocoption of the API turns on; the command line and the plugins leave Javadoc as it is:/** ... **/no longer comes out as/** ... * */(google/google-java-format#1474 by Liam Miller-Cushon; #115).<pre>gets no empty lines after/**(e4cef58 by Chris Povirk; #116).<pre>{@code ...}block written without*keep their indentation: the defect of google/google-java-format#1476, fixed in this formatter's own lexer (#117).Fixed here
//comment too long for its line stays where the first run wrapped it; the next run used to move the wrapped part to the indent of the code. google-java-format has had this open since 2017 (google/google-java-format#211; #169).//$NON-NLS-n$markers stay valid for Eclipse: no space is inserted after//, and each marker stays on the line of its string when a statement is wrapped or reflowed (#23, #150)."one " + "two"into"one two", so the output no longer depends on where the author broke a string (palantir/palantir-java-format#1781 by Zayan Khan, closed there unmerged, for palantir/palantir-java-format#68; #176).java.langimport that decides which class a simple name means (palantir/palantir-java-format#1778 by Zayan Khan, closed there unmerged, for palantir/palantir-java-format#1334; #174).->or+=comes before it on its line (#170).// MOE:comment wraps like any other line comment (#150).Thanks
To Liam Miller-Cushon and Chris Povirk of google-java-format, and to Tanvir Alam and Zayan Khan: their work is in this release, with their names on the commits.
This discussion was created from the release 21.0.1.
All reactions