Skip to content

Commit

Permalink
Perform some minor adjustments
Browse files Browse the repository at this point in the history
Add LF character at the end of the ServicesConsistency.java and
java.security files.

Change jtreg bug ID of ServicesConsistency.java to refer to the new one
created by @martinuy: https://bugs.openjdk.org/browse/JDK-8345139.

Remove Security Manager related comments, as openjdk#22418 is in the pipeline,
also see https://bugs.openjdk.org/browse/JDK-8338411.
  • Loading branch information
franferrax committed Nov 28, 2024
1 parent 2c6f6a8 commit 6933fce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions src/java.base/share/classes/java/security/Provider.java
Original file line number Diff line number Diff line change
Expand Up @@ -950,9 +950,6 @@ private boolean isValid(Service svc) {

@Override
public SvcOpResult putService(Service svc) {
// At this point, the caller's check for putProviderProperty
// permission succeeded, so it is safe to generate keys for the
// service that will be on the map.
svc.generateServiceKeys();

// Define a set of algorithm and alias keys that, if already
Expand Down Expand Up @@ -2521,9 +2518,7 @@ public Service(Provider provider, String type, String algorithm,
* service and alias keys must be generated. Currently used by
* ServicesMapImpl::putService. Legacy API methods do not need to call:
* they generated the algorithm key at construction time and alias
* keys with Service::addAliasKey. This method assumes that a
* putProviderProperty permission was checked before, as unprivileged
* callers should not intern Strings.
* keys with Service::addAliasKey.
*/
private void generateServiceKeys() {
if (algKey == null) {
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/conf/security/java.security
Original file line number Diff line number Diff line change
Expand Up @@ -1625,4 +1625,4 @@ jdk.tls.alpnCharset=ISO_8859_1
# Enable all services except those involving the algorithms MD2 or MD5:
# jdk.security.providers.filter=!*.*.*MD2*; !*.*.*MD5*; *
#
#jdk.security.providers.filter=
#jdk.security.providers.filter=
4 changes: 2 additions & 2 deletions test/jdk/java/security/Provider/ServicesConsistency.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/*
* @test
* @bug 8315487
* @bug 8345139
* @run main/othervm/timeout=60 -enablesystemassertions ServicesConsistency
*/

Expand Down Expand Up @@ -1106,4 +1106,4 @@ private static void testCreateServiceByAttr() throws Throwable {
assertClassnamePropValue(algPropKeyL, class1);
assertAttribute(p.getService(sT, algL), attrL, attrValue);
}
}
}

0 comments on commit 6933fce

Please sign in to comment.