-
Notifications
You must be signed in to change notification settings - Fork 414
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
@Nonnull
annotations does not work
#2956
@Nonnull
annotations does not work
#2956
Comments
@owl-from-hogvarts
and check your workspace settings - <your_project>/.vscode/settings.json |
Hello! Thank you for reply. As you can see in Additional information section null analysis is set to |
@snjeza Also, should compiler itself (i.e. when |
No, it shouldn't. |
I can reproduce the issue when using an Eclipse or invisible project. |
In eclipse P.S. Tested on both |
In dev console in vscode I can see:
May be this is related to the problem. Notice, that even after this error extension works fine, i.e. It can resolve references to variable, classes and so on, do refactoring. So except null analysis all works as expected |
I also see the message like above even when null analysis is explicitly disabled |
Thank you for fix, @snjeza! How can I test it? Is switching to pre-release version of the extensions is enough? or should I manually rebuild extension from sources, including |
Thank you again! I have build extension from sources. No more errors in dev console. Also I figured out that I should have created project, so extension could init config files properly |
Annotations related to null safety (
@Nullable
,@NonNull
,@NonNullByDefault
) do not work. They simply has no effect.[provide a description of the issue]
Environment
Steps To Reproduce
javax.annotations
java.compile.mode
toautomatic
@Nonnull
[Please attach a sample project reproducing the error]
Please attach logs
Current Result
In the code snippet below, annotations should clearly produce errors. But they don't.
Same thing with
org.eclipse.jdt.annotation.NonNull
Expected Result
The above code should produce errors when
null
is passes as parameter.Additional Informations
Packages were downloaded manully from maven central repository:
https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305/3.0.2
https://mvnrepository.com/artifact/org.eclipse.jdt/org.eclipse.jdt.annotation/2.2.700
settings.json
client.log
.log
The text was updated successfully, but these errors were encountered: