changeset 9382:ff74bb12f2fb

8036747: Fix unchecked lint warnings in java.security.Provider Reviewed-by: xuelei
author darcy
date Wed, 05 Mar 2014 22:32:14 -0800
parents 07d78a5dd853
children 0ef5430bf5a7
files src/share/classes/java/security/Provider.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/security/Provider.java	Wed Mar 05 17:08:37 2014 -0800
+++ b/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)) {