Skip to content
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

Java 17 support for JEP 411: Deprecate the Security Manager for Removal #1793

Closed
jorsol opened this issue Nov 3, 2021 · 2 comments
Closed
Labels

Comments

@jorsol
Copy link

jorsol commented Nov 3, 2021

Running SpotBugs 4.4.2 on Java 17 prints this warning:

[INFO] --- spotbugs-maven-plugin:4.4.2.2:spotbugs (spotbugs) @ cm-api ---
[INFO] Fork Value is true
     [java] WARNING: A terminally deprecated method in java.lang.System has been called
     [java] WARNING: System::setSecurityManager has been called by edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue (file:/.m2/repository/com/github/spotbugs/spotbugs/4.4.2/spotbugs-4.4.2.jar)
     [java] WARNING: Please consider reporting this to the maintainers of edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue
     [java] WARNING: System::setSecurityManager will be removed in a future release

Since the Security Manager will be removed in the future, it would be great to have proper support for Java 17 and up.

On Java 18-ea the message is:

[INFO] --- spotbugs-maven-plugin:4.4.2.2:spotbugs (spotbugs) @ cm-api ---
[INFO] Fork Value is true
     [java] The following errors occurred during analysis:
     [java]   Unable to construct type qualifier checker javax/annotation/Nonnull$Checker
     [java]     java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
     [java]       At java.base/java.lang.System.setSecurityManager(System.java:411)
     [java]       At edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue.<init>(TypeQualifierValue.java:157)
     [java]       At edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue.getValue(TypeQualifierValue.java:298)
     [java]       At edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue.getValue(TypeQualifierValue.java:306)
     [java]       At edu.umd.cs.findbugs.ba.npe.TypeQualifierNullnessAnnotationDatabase.<init>(TypeQualifierNullnessAnnotationDatabase.java:70)
     [java]       At edu.umd.cs.findbugs.ba.AnalysisContext.getNullnessAnnotationDatabase(AnalysisContext.java:1055)
     [java]       At edu.umd.cs.findbugs.ba.AnalysisContext.updateDatabases(AnalysisContext.java:1008)
     [java]       At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1061)
     [java]       At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
     [java]       At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
     [java]       At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
@welcome
Copy link

welcome bot commented Nov 3, 2021

Thanks for opening your first issue here! 😃
Please check our contributing guideline. Especially when you report a problem, make sure you share a Minimal, Complete, and Verifiable example to reproduce it in this issue.

@KengoTODA
Copy link
Member

Duplicate of #1579

@KengoTODA KengoTODA marked this as a duplicate of #1579 Nov 4, 2021
@jorsol jorsol closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants