Skip to content

Conversation

@RogerRiggs
Copy link
Contributor

@RogerRiggs RogerRiggs commented Nov 12, 2024

After JDK-8338411, java.time implementation dependencies on doPriviledged and AccessController are removed.
Some refactoring to cleanup the remaining code is expected.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8344039: Remove security manager dependency in java.time (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22042/head:pull/22042
$ git checkout pull/22042

Update a local copy of the PR:
$ git checkout pull/22042
$ git pull https://git.openjdk.org/jdk.git pull/22042/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22042

View PR using the GUI difftool:
$ git pr show -t 22042

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22042.diff

Using Webrev

Link to Webrev Comment

AlanBateman and others added 30 commits September 30, 2024 18:02
Co-authored-by: Sean Mullan <[email protected]>
Co-authored-by: Alan Bateman <[email protected]>
Co-authored-by: Weijun Wang <[email protected]>
Co-authored-by: Aleksei Efimov <[email protected]>
Co-authored-by: Brian Burkhalter <[email protected]>
Co-authored-by: Daniel Fuchs <[email protected]>
Co-authored-by: Harshitha Onkar <[email protected]>
Co-authored-by: Joe Wang <[email protected]>
Co-authored-by: Jorn Vernee <[email protected]>
Co-authored-by: Justin Lu <[email protected]>
Co-authored-by: Kevin Walls <[email protected]>>
Co-authored-by: Lance Andersen <[email protected]>
Co-authored-by: Naoto Sato <[email protected]>
Co-authored-by: Roger Riggs <[email protected]>
Co-authored-by: Brent Christian <[email protected]>
setInitialContextFactoryBuilder and setObjectFactoryBuilder methods in
javax.naming.spi.NamingManager.
permission cannot be used anymore to control access.
…sion

checks of the Class.getNestHost and getNestMembers methods, which no
longer apply.
@openjdk-notifier openjdk-notifier bot changed the base branch from pr/21498 to master November 12, 2024 17:20
@openjdk-notifier
Copy link

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout 8344039-sm-cleanup-java-time
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Nov 12, 2024

@RogerRiggs this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout 8344039-sm-cleanup-java-time
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Nov 12, 2024

⚠️ @RogerRiggs This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Nov 12, 2024
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Nov 12, 2024
@RogerRiggs RogerRiggs marked this pull request as ready for review November 12, 2024 19:24
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 12, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 12, 2024

Webrevs

static {
// if the property java.time.zone.DefaultZoneRulesProvider is
// set then its value is the class name of the default provider
@SuppressWarnings("removal")
Copy link
Member

@naotoj naotoj Nov 13, 2024

Choose a reason for hiding this comment

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

Should this SuppressWarnings be removed?

ServiceLoader configuration exceptions (in a static initialization) are rethrown as Error.
Remove dependency on SecurityException thrown by ServiceLoader (as obsolete)
Copy link
Member

@seanjmullan seanjmullan Nov 13, 2024

Choose a reason for hiding this comment

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

Lines 171-172:

            if (ex.getCause() instanceof SecurityException) {
                continue;  // ignore the security exception, try the next provider
            }

You may be able to remove this code, but may be better to leave it as-is for now until the SL code has been checked for cleanup.

Copy link
Contributor

Choose a reason for hiding this comment

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

The SL changes are in JDK-8344011.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 13, 2024
@seanjmullan
Copy link
Member

The PR description above seems to be copied from the serialization PR.

Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

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

Looks good to me Roger

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Nov 13, 2024
Copy link
Member

@naotoj naotoj left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 13, 2024
@RogerRiggs
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 13, 2024

Going to push as commit 5ac330b.
Since your change was applied there have been 26 commits pushed to the master branch:

  • 1eb38c8: 8343219: Manual clientlibs test failures after SM removal
  • dde6230: 8343416: CDS dump fails when unregistered class can also be loaded from system modules
  • ffea980: 8344023: Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs
  • 5e01c40: 8343981: Remove usage of security manager from Thread and related classes
  • dbf2346: 8341260: Add Float16 to jdk.incubator.vector
  • a5f11b5: 8343483: Remove unnecessary @SuppressWarnings annotations (serviceability)
  • 7be7772: 8344112: Remove code to support security manager execution mode from DatagramChannel implementation
  • bd3fec3: 8344086: Remove security manager dependency in FFM
  • 916694f: 8343317: Extend test generation tool to handle APX NDD/NF flavor of instructions
  • eb240a7: 8344051: Problemlist jdk/jfr/event/runtime/TestNativeMemoryUsageEvents.java with ZGC until JDK-8343893 is fixed
  • ... and 16 more: https://git.openjdk.org/jdk/compare/63eb4853f6782f350f67b6bcf25d83bc4480be71...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 13, 2024
@openjdk openjdk bot closed this Nov 13, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 13, 2024
@openjdk
Copy link

openjdk bot commented Nov 13, 2024

@RogerRiggs Pushed as commit 5ac330b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@RogerRiggs RogerRiggs deleted the 8344039-sm-cleanup-java-time branch February 24, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.