GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — instanceOf pattern bug in release 1.10.0 (not in 1.9!) · Issue #594 · google/google-java-format Closed DescriptionConsider the following minimal example: public class MinimalExample { public void thisIsNotFormattedCorrectly(Object something){ if(something instanceof String somethingAsString){ return; } //doSomethingElse } } When formatting this with the 1.9 jar: When formatting it with the 1.10 jar: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.googlejavaformat.java.JavacTokens$CommentSavingTokenizer (file:/[PATH]/git/google-java-format-1.10.0-all-deps.jar) to field com.sun.tools.javac.parser.JavaTokenizer.reader WARNING: Please consider reporting this to the maintainers of com.google.googlejavaformat.java.JavacTokens$CommentSavingTokenizer WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [PATH]/MinimalExample.java:3:30: error: java.lang.LinkageError: com.sun.source.tree.BindingPatternTree.getName() at com.google.googlejavaformat.java.java14.Java14InputAstVisitor.visitBindingPattern(Java14InputAstVisitor.java:67) at com.google.googlejavaformat.java.java14.Java14InputAstVisitor.visitBindingPattern(Java14InputAstVisitor.java:47) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBindingPattern.accept(JCTree.java:2231) at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) at com.google.googlejavaformat.java.JavaInputAstVisitor.scan(JavaInputAstVisitor.java:329) at com.google.googlejavaformat.java.java14.Java14InputAstVisitor.visitInstanceOf(Java14InputAstVisitor.java:207) at com.google.googlejavaformat.java.java14.Java14InputAstVisitor.visitInstanceOf(Java14InputAstVisitor.java:47) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCInstanceOf.accept(JCTree.java:2178) at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) at com.google.googlejavaformat.java.JavaInputAstVisitor.scan(JavaInputAstVisitor.java:329) at com.google.googlejavaformat.java.JavaInputAstVisitor.visitIf(JavaInputAstVisitor.java:1081) at com.google.googlejavaformat.java.JavaInputAstVisitor.visitIf(JavaInputAstVisitor.java:157) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1513) at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) at com.google.googlejavaformat.java.JavaInputAstVisitor.scan(JavaInputAstVisitor.java:329) at com.google.googlejavaformat.java.JavaInputAstVisitor.visitStatements(JavaInputAstVisitor.java:2181) at com.google.googlejavaformat.java.JavaInputAstVisitor.methodBody(JavaInputAstVisitor.java:1495) at com.google.googlejavaformat.java.JavaInputAstVisitor.visitMethod(JavaInputAstVisitor.java:1482) at com.google.googlejavaformat.java.JavaInputAstVisitor.visitMethod(JavaInputAstVisitor.java:157) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:925) at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) at com.google.googlejavaformat.java.JavaInputAstVisitor.scan(JavaInputAstVisitor.java:329) at com.google.googlejavaformat.java.JavaInputAstVisitor.addBodyDeclarations(JavaInputAstVisitor.java:3531) at com.google.googlejavaformat.java.JavaInputAstVisitor.visitClassDeclaration(JavaInputAstVisitor.java:2004) at com.google.googlejavaformat.java.java14.Java14InputAstVisitor.visitClass(Java14InputAstVisitor.java:104) at com.google.googlejavaformat.java.java14.Java14InputAstVisitor.visitClass(Java14InputAstVisitor.java:47) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:832) at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) at com.google.googlejavaformat.java.JavaInputAstVisitor.scan(JavaInputAstVisitor.java:329) at com.google.googlejavaformat.java.JavaInputAstVisitor.visitCompilationUnit(JavaInputAstVisitor.java:374) at com.google.googlejavaformat.java.JavaInputAstVisitor.visitCompilationUnit(JavaInputAstVisitor.java:157) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:603) at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) at com.google.googlejavaformat.java.JavaInputAstVisitor.scan(JavaInputAstVisitor.java:329) at com.google.googlejavaformat.java.Formatter.format(Formatter.java:170) at com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:291) at com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:267) at com.google.googlejavaformat.java.FormatFileCallable.call(FormatFileCallable.java:45) at com.google.googlejavaformat.java.FormatFileCallable.call(FormatFileCallable.java:26) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832) Caused by: java.lang.NoSuchMethodException: com.sun.source.tree.BindingPatternTree.getName() at java.base/java.lang.Class.getMethod(Class.java:2201) at com.google.googlejavaformat.java.java14.Java14InputAstVisitor.visitBindingPattern(Java14InputAstVisitor.java:63) ... 42 more Suppressed: java.lang.NoSuchMethodException: com.sun.source.tree.BindingPatternTree.getVariable() at java.base/java.lang.Class.getMethod(Class.java:2201) at com.google.googlejavaformat.java.java14.Java14InputAstVisitor.visitBindingPattern(Java14InputAstVisitor.java:58) ... 42 more Reacted by Kishan B Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |