#19724 closed enhancement (fixed)
Add compatibility with Java 16
Reported by: | simon04 | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | 21.02 |
Component: | Core | Version: | |
Keywords: | java16 | Cc: | stoecker, Stereo |
Description (last modified by )
Followup of #18755
First EA builds of Java 16 are available.
See #20522 for Java 17 compatibility.
Attachments (0)
Change History (42)
comment:1 by , 4 years ago
comment:3 by , 4 years ago
Build broke with errorprone. I created this bug report:
[javac] /var/lib/jenkins/jobs/Java-EarlyAccess-JOSM/workspace/jdk/JDK16/src/org/openstreetmap/josm/tools/LanguageInfo.java:2: error: An unhandled exception was thrown by the Error Prone static analysis plugin. [javac] package org.openstreetmap.josm.tools; [javac] ^ [javac] Please report this at https://github.com/google/error-prone/issues/new and include the following: [javac] [javac] error-prone version: 2.4.0 [javac] BugPattern: AlmostJavadoc [javac] Stack Trace: [javac] java.lang.NoSuchFieldError: reader [javac] at com.google.errorprone.util.ErrorProneTokens$CommentSavingTokenizer.processComment(ErrorProneTokens.java:85) [javac] at jdk.compiler/com.sun.tools.javac.parser.JavaTokenizer.readToken(JavaTokenizer.java:919) [javac] at jdk.compiler/com.sun.tools.javac.parser.Scanner.nextToken(Scanner.java:115) [javac] at com.google.errorprone.util.ErrorProneTokens.getTokens(ErrorProneTokens.java:57) [javac] at com.google.errorprone.util.ErrorProneTokens.getTokens(ErrorProneTokens.java:74) [javac] at com.google.errorprone.util.ErrorProneTokens.getTokens(ErrorProneTokens.java:65) [javac] at com.google.errorprone.bugpatterns.javadoc.AlmostJavadoc.matchCompilationUnit(AlmostJavadoc.java:80) [javac] at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:451) [javac] at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:557) [javac] at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:152) [javac] at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:603) [javac] at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:60) [javac] at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58) [javac] at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43) [javac] at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152) [javac] at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132) [javac] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1421) [javac] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1368) [javac] at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:960) [javac] at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317) [javac] at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176) [javac] at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64) [javac] at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
comment:4 by , 4 years ago
Milestone: | 20.10 → 20.12 |
---|
comment:7 by , 4 years ago
Error-Prone 2.5.1 has been released with Java 16 compatibility but it crashes for us, see https://github.com/google/error-prone/issues/2152
comment:8 by , 4 years ago
Milestone: | 21.01 → 21.02 |
---|
comment:10 by , 4 years ago
Error-prone patch:
-
build.xml
282 282 <compilerarg value="-Xlint:unchecked"/> 283 283 <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 --> 284 284 <compilerarg value="-XDignore.symbol.file"/> 285 <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:JdkObsolete:OFF -Xep:EqualsGetClass:OFF -Xep:UndefinedEquals:OFF -Xep:BadImport:OFF -Xep:AnnotateFormatMethod:OFF " unless:set="noErrorProne"/>285 <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:JdkObsolete:OFF -Xep:EqualsGetClass:OFF -Xep:UndefinedEquals:OFF -Xep:BadImport:OFF -Xep:AnnotateFormatMethod:OFF -Xep:JavaUtilDate:OFF -Xep:DoNotCallSuggester:OFF -Xep:BanSerializableRead:OFF" unless:set="noErrorProne"/> 286 286 <compilerarg line="-Xmaxwarns 1000"/> 287 287 <classpath> 288 288 <path refid="runtime.path"/> -
tools/ivy.xml
29 29 <dependency org="com.github.spotbugs" name="spotbugs" rev="4.0.1" conf="spotbugs->default"/> 30 30 <dependency org="com.github.spotbugs" name="spotbugs-ant" rev="4.0.1" conf="spotbugs->default"/> 31 31 <!-- errorprone->default --> 32 <dependency org="com.google.errorprone" name="error_prone_core" rev="2. 4.0" conf="errorprone->default"/>32 <dependency org="com.google.errorprone" name="error_prone_core" rev="2.5.1" conf="errorprone->default"/> 33 33 <!-- errorprone->default --> 34 34 <dependency org="com.google.errorprone" name="javac" rev="9+181-r4173-1" conf="errorprone_javac->default"/> 35 35 </dependencies>
comment:11 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:12 by , 4 years ago
Cc: | removed |
---|
comment:15 by , 4 years ago
Even when disabling the error-prone check that crashes, the build still fails with Java 16: https://github.com/google/error-prone/issues/2195
comment:20 by , 4 years ago
Milestone: | 21.03 → 21.02 |
---|
comment:27 by , 4 years ago
We can enable it, it works. I don't understand yet why JUnit fails for plugins though.
comment:31 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:35 by , 4 years ago
Vincent, congratulations, you are named on the Java blog as "individuals provided invaluable feedback on build quality, logged good quality bugs or offered frequent updates" – https://inside.java/2021/03/16/the-arrival-of-java16/ 🥳
comment:36 by , 4 years ago
Cc: | added |
---|
Haha I saw. But I think it's thanks to a macos bug reported by Stereo who probably deserves the glory.
comment:38 by , 4 years ago
Haha, thanks. But I'm sure they must have gotten your name for a good reason.
comment:41 by , 4 years ago
Description: | modified (diff) |
---|
In 17134/josm: