Skip to content

Fix for #2958 eliminates CCE but leads to NPE #2974

@cpovirk

Description

@cpovirk

Hi, we have one pesky test (one from an OfficeDev repo) that starts failing with the recent @InjectMocks changes. First it was the ClassCastException that was reported in #2958, but after the fix for that, it's a NullPointerException:

$ git clone [email protected]:cpovirk/ews-java-api.git -b mockitonpe # or check out 3ed334391d09f20e36ecd8e2a0efb3529085e1c6 if you prefer a SHA

$ cd ews-java-api

$ mvn clean install -Dtest=ChangeCollectionTest -Dmaven.javadoc.skip
...
java.lang.NullPointerException
  at org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter.getSuperTypes(TypeBasedCandidateFilter.java:79)
  at org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter.isCompatibleTypes(TypeBasedCandidateFilter.java:58)
  at org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter.lambda$isCompatibleTypes$0(TypeBasedCandidateFilter.java:62)
  ...

I'll attach the full log, along with logs from the CCE days and from before the @InjectMocks changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions