Skip to content

NullPointerException in NestedInstanceOfConditions #4167

@anthonyvdotbe

Description

@anthonyvdotbe

error-prone doesn't give the full stack trace (at least when run as part of a Maven build), so hopefully this is sufficient:

error-prone version: 2.23.0
BugPattern: NestedInstanceOfConditions
Stack Trace:
java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Type.isPrimitive()" because "t" is null

The line on which it failed looks like:

if(baz instanceof Foo.Bar.Baz(String text, Locale locale, Charset charset)) {

where Foo is an enum, Bar a sealed interface and Baz a record that implements Bar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions