j.l.Class: include componentType() in isArray() @EnsureNonNullIf annotation#128
j.l.Class: include componentType() in isArray() @EnsureNonNullIf annotation#128thisisalexandercook wants to merge 2 commits intoeisop:masterfrom
j.l.Class: include componentType() in isArray() @EnsureNonNullIf annotation#128Conversation
j.l.Class: include componentType() in isArray() @EnsureNonNullIf` annotation
j.l.Class: include componentType() in isArray() @EnsureNonNullIf` annotationj.l.Class: include componentType() in isArray() @EnsureNonNullIf annotation
|
One thing to test: componentType() was added in JDK 12. In general, we probably want warnings about contracts that refer to methods that don't exist. But for the JDK we need some special handling. So we just need to make sure whether we get a warning on the use of a method that uses a non-existing method in a contract. |
|
Dusting the cob webs off this one: I tested this with flag
Result: calling |
This PR adds the
componentType()method to the@EnsureNonNullannotation expression list attached to theisArray()method.componentType()is indicated as equivalent togetComponentType()which is already included in this expression list.