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

GuardedByUtils: return empty set instead of null #1110

wants to merge 1 commit into
base: master


None yet
3 participants
Copy link

don-vip commented Sep 5, 2018

See #1106 (comment)

This fixes an NPE seen with JDK12 (when #1107 is merged):

[javac]     public final WaySegment getNearestWaySegment(Point p, Predicate<OsmPrimitive> predicate,
    [javac]                             ^
    [javac]      Please report this at and include the following:
    [javac]      error-prone version: 2.3.2-SNAPSHOT
    [javac]      BugPattern: GuardedBy
    [javac]      Stack Trace:
    [javac]      java.lang.NullPointerException
    [javac]   	at$LockScanner.checkMatch(
    [javac]   	at$LockScanner.visitIdentifier(
    [javac]   	at$LockScanner.visitIdentifier(
    [javac]   	at jdk.compiler/$JCIdent.accept(

@googlebot googlebot added the cla: yes label Sep 5, 2018

simon04 pushed a commit to openstreetmap/josm that referenced this pull request Sep 5, 2018

floscher pushed a commit to floscher/josm that referenced this pull request Sep 5, 2018

This was referenced Sep 5, 2018


This comment has been minimized.

Copy link

cushon commented Sep 6, 2018

Can you add a unit test? It is it covered by existing tests when running in JDK 12?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.