Skip to content

Remove and cleanup System.getSecurityManager() #716

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

Merged
merged 2 commits into from
May 2, 2025

Conversation

MBoegers
Copy link
Contributor

@MBoegers MBoegers commented May 2, 2025

What's changed?

Since Java 24 a call to System.getSecurityManager() always returns null.
The recipe makes this explicit by replacing these calls with null.
Afterward, cleans up the code if unreachable branches are now obvious.

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite May 2, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • src/main/resources/META-INF/rewrite/examples.yml
    • lines 997-1004
    • lines 1033-1042

@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite May 2, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • src/main/resources/META-INF/rewrite/examples.yml
    • lines 997-1004
    • lines 1033-1042

@timtebeek timtebeek merged commit 2fe392a into main May 2, 2025
2 checks passed
@timtebeek timtebeek deleted the j24-system-getsecrutriymanager branch May 2, 2025 21:40
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants