From 6933fcedf40ce0cf2b3ae7ad65e6037fa4a48285 Mon Sep 17 00:00:00 2001 From: Francisco Ferrari Bihurriet Date: Thu, 28 Nov 2024 17:24:53 +0100 Subject: [PATCH] Perform some minor adjustments 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 #22418 is in the pipeline, also see https://bugs.openjdk.org/browse/JDK-8338411. --- src/java.base/share/classes/java/security/Provider.java | 7 +------ src/java.base/share/conf/security/java.security | 2 +- test/jdk/java/security/Provider/ServicesConsistency.java | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/java.base/share/classes/java/security/Provider.java b/src/java.base/share/classes/java/security/Provider.java index 0c22e2c8e8595..47b50bb5277ad 100644 --- a/src/java.base/share/classes/java/security/Provider.java +++ b/src/java.base/share/classes/java/security/Provider.java @@ -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 @@ -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) { diff --git a/src/java.base/share/conf/security/java.security b/src/java.base/share/conf/security/java.security index 7617d477beef7..644b86341ad7d 100644 --- a/src/java.base/share/conf/security/java.security +++ b/src/java.base/share/conf/security/java.security @@ -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= \ No newline at end of file +#jdk.security.providers.filter= diff --git a/test/jdk/java/security/Provider/ServicesConsistency.java b/test/jdk/java/security/Provider/ServicesConsistency.java index bfc74109eb9d3..50ecdb1a91993 100644 --- a/test/jdk/java/security/Provider/ServicesConsistency.java +++ b/test/jdk/java/security/Provider/ServicesConsistency.java @@ -34,7 +34,7 @@ /* * @test - * @bug 8315487 + * @bug 8345139 * @run main/othervm/timeout=60 -enablesystemassertions ServicesConsistency */ @@ -1106,4 +1106,4 @@ private static void testCreateServiceByAttr() throws Throwable { assertClassnamePropValue(algPropKeyL, class1); assertAttribute(p.getService(sT, algL), attrL, attrValue); } -} \ No newline at end of file +}