-
Notifications
You must be signed in to change notification settings - Fork 74
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
Linkage Checker: javax.annotation.Nullable false positive? #1045
Comments
No, it did not. The code below just works without the presence of the Nullable class.
So this is false positive; Linkage Checker should not report missing annotation classes. Output from Javap
This javap output tells that just using Beam's FieldValueTypeInformationIt reads the annotation using reflection:
This usage requires the Nullable class to be present in the class path. Example:
This now seems a genuine error. Why sdks:java:core tests succeed?It's because test runtime has guava-testlib.
|
Created example repository to demonstrate the missing class problem. |
Created BEAM-8917 |
Created a PR: apache/beam#10324 |
It was true positive. Fixed in https://issues.apache.org/jira/projects/BEAM/issues/BEAM-8917 |
Some Java annotations don't need to be present at runtime class path. I thought
javax.annotation.Nullable
may be such class when I saw Linkage Checker reported the following:However, as per its Javadoc, the retention policy is RUNTIME, meaning that the annotation should be available at runtime.
Question
@Nullable
need to be present at runtime?LinkageError
if the annotation does not exist at runtime?The text was updated successfully, but these errors were encountered: