8036747: Fix unchecked lint warnings in java.security.Provider
Reviewed-by: xuelei
This commit is contained in:
parent
b679ef980a
commit
f666025b30
@ -769,6 +769,7 @@ public abstract class Provider extends Properties {
|
|||||||
return super.replace(key, value);
|
return super.replace(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked") // Function must actually operate over strings
|
||||||
private void implReplaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
|
private void implReplaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
|
||||||
legacyChanged = true;
|
legacyChanged = true;
|
||||||
if (legacyStrings == null) {
|
if (legacyStrings == null) {
|
||||||
@ -779,7 +780,7 @@ public abstract class Provider extends Properties {
|
|||||||
super.replaceAll(function);
|
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) {
|
private Object implMerge(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
|
||||||
if ((key instanceof String) && (value instanceof String)) {
|
if ((key instanceof String) && (value instanceof String)) {
|
||||||
if (!checkLegacy(key)) {
|
if (!checkLegacy(key)) {
|
||||||
@ -791,6 +792,7 @@ public abstract class Provider extends Properties {
|
|||||||
return super.merge(key, value, remappingFunction);
|
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) {
|
private Object implCompute(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
|
||||||
if (key instanceof String) {
|
if (key instanceof String) {
|
||||||
if (!checkLegacy(key)) {
|
if (!checkLegacy(key)) {
|
||||||
@ -802,6 +804,7 @@ public abstract class Provider extends Properties {
|
|||||||
return super.compute(key, remappingFunction);
|
return super.compute(key, remappingFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked") // Function must actually operate over strings
|
||||||
private Object implComputeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) {
|
private Object implComputeIfAbsent(Object key, Function<? super Object, ? extends Object> mappingFunction) {
|
||||||
if (key instanceof String) {
|
if (key instanceof String) {
|
||||||
if (!checkLegacy(key)) {
|
if (!checkLegacy(key)) {
|
||||||
@ -813,6 +816,7 @@ public abstract class Provider extends Properties {
|
|||||||
return super.computeIfAbsent(key, mappingFunction);
|
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) {
|
private Object implComputeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) {
|
||||||
if (key instanceof String) {
|
if (key instanceof String) {
|
||||||
if (!checkLegacy(key)) {
|
if (!checkLegacy(key)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user