From f666025b30f1c39bf50495415ce4c046cf87a80f Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Wed, 5 Mar 2014 22:32:14 -0800 Subject: [PATCH] 8036747: Fix unchecked lint warnings in java.security.Provider Reviewed-by: xuelei --- jdk/src/share/classes/java/security/Provider.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/security/Provider.java b/jdk/src/share/classes/java/security/Provider.java index d7e08267b20..e8c7a081b5a 100644 --- a/jdk/src/share/classes/java/security/Provider.java +++ b/jdk/src/share/classes/java/security/Provider.java @@ -769,6 +769,7 @@ public abstract class Provider extends Properties { return super.replace(key, value); } + @SuppressWarnings("unchecked") // Function must actually operate over strings private void implReplaceAll(BiFunction function) { legacyChanged = true; if (legacyStrings == null) { @@ -779,7 +780,7 @@ public abstract class Provider extends Properties { super.replaceAll(function); } - + @SuppressWarnings("unchecked") // Function must actually operate over strings private Object implMerge(Object key, Object value, BiFunction remappingFunction) { if ((key instanceof String) && (value instanceof String)) { if (!checkLegacy(key)) { @@ -791,6 +792,7 @@ public abstract class Provider extends Properties { return super.merge(key, value, remappingFunction); } + @SuppressWarnings("unchecked") // Function must actually operate over strings private Object implCompute(Object key, BiFunction remappingFunction) { if (key instanceof String) { if (!checkLegacy(key)) { @@ -802,6 +804,7 @@ public abstract class Provider extends Properties { return super.compute(key, remappingFunction); } + @SuppressWarnings("unchecked") // Function must actually operate over strings private Object implComputeIfAbsent(Object key, Function mappingFunction) { if (key instanceof String) { if (!checkLegacy(key)) { @@ -813,6 +816,7 @@ public abstract class Provider extends Properties { return super.computeIfAbsent(key, mappingFunction); } + @SuppressWarnings("unchecked") // Function must actually operate over strings private Object implComputeIfPresent(Object key, BiFunction remappingFunction) { if (key instanceof String) { if (!checkLegacy(key)) {