Skip to content

Conversation

@DavyLandman
Copy link

I've kept these changes in a separate PR, for one thing since I saw that in AccessibleObject::canAccess @cpovirk in aadd76c added a comment about this, so this might be something where you want to be stricter?

As in, you can pass in a null if you're doing reflection to static fields/methods, but I guess it's more common that you intend to use it with an object instance?

Copy link
Member

@smillst smillst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because passing null to these methods may result in a NPE, these parameters cannot be annotated with @Nullable. See https://checkerframework.org/manual/#nullness-jdk-conservative for a more detailed explanation. We would accept these in the stub file https://github.com/typetools/checker-framework/blob/master/checker/src/main/java/org/checkerframework/checker/nullness/sometimes-nullable.astub.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants