Skip to content

Remove and cleanup System.getSecurityManager()#716

Merged
timtebeek merged 2 commits into
mainfrom
j24-system-getsecrutriymanager
May 2, 2025
Merged

Remove and cleanup System.getSecurityManager()#716
timtebeek merged 2 commits into
mainfrom
j24-system-getsecrutriymanager

Conversation

@MBoegers

@MBoegers MBoegers commented May 2, 2025

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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