Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CanBeStatic: Fix NPE #1111

Closed
wants to merge 1 commit into from
Closed

CanBeStatic: Fix NPE #1111

wants to merge 1 commit into from

Conversation

don-vip
Copy link
Contributor

@don-vip don-vip commented Sep 5, 2018

See #1106 (comment)

Solves NPE (after #1107 and #1110 are merged) with Java 12:

[javac]      error-prone version: 2.3.2-SNAPSHOT
    [javac]      BugPattern: ClassCanBeStatic
    [javac]      Stack Trace:
    [javac]      java.lang.NullPointerException
    [javac]   	at com.google.errorprone.bugpatterns.CanBeStaticAnalyzer.visitIdent(CanBeStaticAnalyzer.java:60)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2316)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitBreak(TreeScanner.java:222)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBreak.accept(JCTree.java:1559)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitBlock(TreeScanner.java:143)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1026)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitIf(TreeScanner.java:213)
    [javac]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1486)

simon04 pushed a commit to JOSM/josm that referenced this pull request Sep 5, 2018
@don-vip don-vip mentioned this pull request Sep 5, 2018
@cushon
Copy link
Collaborator

cushon commented Sep 6, 2018

Can you add a test?

floscher pushed a commit to floscher/josm that referenced this pull request Sep 6, 2018
@kluever kluever mentioned this pull request May 17, 2020
kluever pushed a commit that referenced this pull request May 17, 2020
JDK 12 changes the representation of labelled breaks to use an identifier for
the label (instead of just a name), and the identifier doesn't have a symbol.

Fixes #1111

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=311832221
kluever pushed a commit that referenced this pull request May 17, 2020
JDK 12 changes the representation of labelled breaks to use an identifier for
the label (instead of just a name), and the identifier doesn't have a symbol.

Fixes #1111

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=311832221
@don-vip don-vip deleted the jdk12_pr3 branch June 1, 2020 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants