Polish "Use lambdas for map entry iteration where possible"

Closes gh-12626
This commit is contained in:
Phillip Webb
2018-04-04 19:35:41 -07:00
parent 69bc19e0ca
commit 685babc829
27 changed files with 209 additions and 176 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -422,7 +422,8 @@ class ProjectGenerationRequest {
private static void filter(Map<String, ProjectType> projects, String tag,
String tagValue) {
projects.entrySet().removeIf((entry) -> !tagValue.equals(entry.getValue().getTags().get(tag)));
projects.entrySet().removeIf(
(entry) -> !tagValue.equals(entry.getValue().getTags().get(tag)));
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -67,8 +67,10 @@ public abstract class AnnotatedNodeASTTransformation implements ASTTransformatio
for (ImportNode importNode : module.getStarImports()) {
visitAnnotatedNode(importNode, annotationNodes);
}
module.getStaticImports().forEach((key, value) -> visitAnnotatedNode(value, annotationNodes));
module.getStaticStarImports().forEach((key, value) -> visitAnnotatedNode(value, annotationNodes));
module.getStaticImports().forEach((name,
importNode) -> visitAnnotatedNode(importNode, annotationNodes));
module.getStaticStarImports().forEach((name,
importNode) -> visitAnnotatedNode(importNode, annotationNodes));
for (ClassNode classNode : module.getClasses()) {
visitAnnotatedNode(classNode, annotationNodes);
classNode.visitContents(classVisitor);