From d90c3513222eca752be8d6c31b7ebff62611b683 Mon Sep 17 00:00:00 2001 From: Svetlana Nikandrova Date: Fri, 20 May 2016 11:12:02 -0700 Subject: [PATCH] 8155575: Provider.java contains very long lines because of lambda Reviewed-by: ascarpino --- .../share/classes/java/security/Provider.java | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/security/Provider.java b/jdk/src/java.base/share/classes/java/security/Provider.java index 9ecc8ffe6ba..de09dc49240 100644 --- a/jdk/src/java.base/share/classes/java/security/Provider.java +++ b/jdk/src/java.base/share/classes/java/security/Provider.java @@ -569,7 +569,8 @@ public abstract class Provider extends Properties { * @since 1.8 */ @Override - public synchronized void replaceAll(BiFunction function) { + public synchronized void replaceAll(BiFunction function) { check("putProviderProperty." + name); if (debug != null) { @@ -597,8 +598,8 @@ public abstract class Provider extends Properties { * @since 1.8 */ @Override - public synchronized Object compute(Object key, - BiFunction remappingFunction) { + public synchronized Object compute(Object key, BiFunction remappingFunction) { check("putProviderProperty." + name); check("removeProviderProperty" + name); @@ -628,7 +629,8 @@ public abstract class Provider extends Properties { * @since 1.8 */ @Override - public synchronized Object computeIfAbsent(Object key, Function mappingFunction) { + public synchronized Object computeIfAbsent(Object key, Function mappingFunction) { check("putProviderProperty." + name); check("removeProviderProperty" + name); @@ -657,7 +659,8 @@ public abstract class Provider extends Properties { * @since 1.8 */ @Override - public synchronized Object computeIfPresent(Object key, BiFunction remappingFunction) { + public synchronized Object computeIfPresent(Object key, BiFunction remappingFunction) { check("putProviderProperty." + name); check("removeProviderProperty" + name); @@ -689,7 +692,8 @@ public abstract class Provider extends Properties { * @since 1.8 */ @Override - public synchronized Object merge(Object key, Object value, BiFunction remappingFunction) { + public synchronized Object merge(Object key, Object value, BiFunction remappingFunction) { check("putProviderProperty." + name); check("removeProviderProperty" + name); @@ -868,18 +872,21 @@ public abstract class Provider extends Properties { } @SuppressWarnings("unchecked") // Function must actually operate over strings - private void implReplaceAll(BiFunction function) { + private void implReplaceAll(BiFunction function) { legacyChanged = true; if (legacyStrings == null) { legacyStrings = new LinkedHashMap<>(); } else { - legacyStrings.replaceAll((BiFunction) function); + legacyStrings.replaceAll((BiFunction) function); } super.replaceAll(function); } @SuppressWarnings("unchecked") // Function must actually operate over strings - private Object implMerge(Object key, Object value, BiFunction remappingFunction) { + private Object implMerge(Object key, Object value, BiFunction remappingFunction) { if ((key instanceof String) && (value instanceof String)) { if (!checkLegacy(key)) { return null; @@ -891,7 +898,8 @@ public abstract class Provider extends Properties { } @SuppressWarnings("unchecked") // Function must actually operate over strings - private Object implCompute(Object key, BiFunction remappingFunction) { + private Object implCompute(Object key, BiFunction remappingFunction) { if (key instanceof String) { if (!checkLegacy(key)) { return null; @@ -903,7 +911,8 @@ public abstract class Provider extends Properties { } @SuppressWarnings("unchecked") // Function must actually operate over strings - private Object implComputeIfAbsent(Object key, Function mappingFunction) { + private Object implComputeIfAbsent(Object key, Function mappingFunction) { if (key instanceof String) { if (!checkLegacy(key)) { return null; @@ -915,7 +924,8 @@ public abstract class Provider extends Properties { } @SuppressWarnings("unchecked") // Function must actually operate over strings - private Object implComputeIfPresent(Object key, BiFunction remappingFunction) { + private Object implComputeIfPresent(Object key, BiFunction remappingFunction) { if (key instanceof String) { if (!checkLegacy(key)) { return null;