mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8274464: Remove redundant stream() call before forEach in java.* modules
Reviewed-by: dfuchs, amenkov, vtewari
This commit is contained in:
parent
c10de3538b
commit
f3cedbe928
4 changed files with 5 additions and 8 deletions
|
@ -119,7 +119,7 @@ public class RMIJRMPServerImpl extends RMIServerImpl {
|
|||
else if (credentialsTypes != null) {
|
||||
allowedTypes = Arrays.stream(credentialsTypes).filter(
|
||||
s -> s!= null).collect(Collectors.toSet());
|
||||
allowedTypes.stream().forEach(ReflectUtil::checkPackageAccess);
|
||||
allowedTypes.forEach(ReflectUtil::checkPackageAccess);
|
||||
cFilter = this::newClientCheckInput;
|
||||
} else {
|
||||
allowedTypes = null;
|
||||
|
|
|
@ -416,8 +416,7 @@ class DefaultPlatformMBeanProvider extends PlatformMBeanProvider {
|
|||
map = Collections.<String, BufferPoolMXBean>emptyMap();
|
||||
} else {
|
||||
map = new HashMap<>(list.size());
|
||||
list.stream()
|
||||
.forEach(mbean -> map.put(mbean.getObjectName().getCanonicalName(),mbean));
|
||||
list.forEach(mbean -> map.put(mbean.getObjectName().getCanonicalName(),mbean));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -576,9 +576,7 @@ public class CatalogFeatures {
|
|||
* @param builder the CatalogFeatures builder
|
||||
*/
|
||||
private void setProperties(Builder builder) {
|
||||
builder.values.entrySet().stream().forEach((entry) -> {
|
||||
setProperty(entry.getKey(), State.APIPROPERTY, entry.getValue());
|
||||
});
|
||||
builder.values.forEach((feature, value) -> setProperty(feature, State.APIPROPERTY, value));
|
||||
}
|
||||
/**
|
||||
* Sets the value of a property, updates only if it shall override.
|
||||
|
|
|
@ -413,14 +413,14 @@ class CatalogImpl extends GroupEntry implements Catalog {
|
|||
void loadNextCatalogs() {
|
||||
//loads catalogs specified in nextCatalogs
|
||||
if (nextCatalogs != null) {
|
||||
nextCatalogs.stream().forEach((next) -> {
|
||||
nextCatalogs.forEach((next) -> {
|
||||
getCatalog(this, next.getCatalogURI());
|
||||
});
|
||||
}
|
||||
|
||||
//loads catalogs from the input list
|
||||
if (inputFiles != null) {
|
||||
inputFiles.stream().forEach((uri) -> {
|
||||
inputFiles.forEach((uri) -> {
|
||||
getCatalog(null, URI.create(uri));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue