8036747: Fix unchecked lint warnings in java.security.Provider
authordarcy
Wed, 05 Mar 2014 22:32:14 -0800
changeset 23062 ece6b5d8a71b
parent 23061 c441853d95af
child 23063 9e16600b5dcb
8036747: Fix unchecked lint warnings in java.security.Provider Reviewed-by: xuelei
jdk/src/share/classes/java/security/Provider.java
--- a/jdk/src/share/classes/java/security/Provider.java	Wed Mar 05 17:08:37 2014 -0800
+++ b/jdk/src/share/classes/java/security/Provider.java	Wed Mar 05 22:32:14 2014 -0800
@@ -769,6 +769,7 @@
         return super.replace(key, value);
     }
 
+    @SuppressWarnings("unchecked") // Function must actually operate over strings
     private void implReplaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
         legacyChanged = true;
         if (legacyStrings == null) {
@@ -779,7 +780,7 @@
         super.replaceAll(function);
     }
 
-
+    @SuppressWarnings("unchecked") // Function must actually operate over strings
     private Object implMerge(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
         if ((key instanceof String) && (value instanceof String)) {
             if (!checkLegacy(key)) {
@@ -791,6 +792,7 @@
         return super.merge(key, value, remappingFunction);
     }
 
+    @SuppressWarnings("unchecked") // Function must actually operate over strings
     private Object implCompute(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
         if (key instanceof String) {
             if (!checkLegacy(key)) {
@@ -802,6 +804,7 @@
         return super.compute(key, remappingFunction);
     }
 
+    @SuppressWarnings("unchecked") // Function must actually operate over strings
     private Object implComputeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) {
         if (key instanceof String) {
             if (!checkLegacy(key)) {
@@ -813,6 +816,7 @@
         return super.computeIfAbsent(key, mappingFunction);
     }
 
+    @SuppressWarnings("unchecked") // Function must actually operate over strings
     private Object implComputeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
         if (key instanceof String) {
             if (!checkLegacy(key)) {