Use wildcard generic type signature in declaration of the 'VCAP_REQUIRED_PROPERTIES_PREDICATE' Predicate of a parameterized PropertySource type.

Remove unnecessary @SuppressWarnings('all') annotation from iterator() method.
This commit is contained in:
John Blum
2020-03-18 20:23:00 -07:00
parent f773c19044
commit d90dbf6f7a

View File

@@ -93,7 +93,7 @@ public class VcapPropertySource extends PropertySource<EnumerablePropertySource<
private static final Predicate<String> VCAP_APPLICATION_PROPERTIES_PREDICATE =
propertyName -> String.valueOf(propertyName).trim().toLowerCase().startsWith(VCAP_APPLICATION_PROPERTY);
private static final Predicate<PropertySource> VCAP_REQUIRED_PROPERTIES_PREDICATE =
private static final Predicate<PropertySource<?>> VCAP_REQUIRED_PROPERTIES_PREDICATE =
propertySource -> propertySource.containsProperty(VCAP_APPLICATION_NAME_PROPERTY)
&& propertySource.containsProperty(VCAP_APPLICATION_URIS_PROPERTY);
@@ -352,7 +352,6 @@ public class VcapPropertySource extends PropertySource<EnumerablePropertySource<
}
@Override
@SuppressWarnings("all")
public Iterator<String> iterator() {
return Collections.unmodifiableList(Arrays.asList(getSource().getPropertyNames())).iterator();
}