Polish "Use lambdas for map entry iteration where possible"
Closes gh-12626
This commit is contained in:
@@ -533,8 +533,8 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
|
||||
|
||||
private Map<String, Object> getAnnotationElementValues(AnnotationMirror annotation) {
|
||||
Map<String, Object> values = new LinkedHashMap<>();
|
||||
annotation.getElementValues().forEach((key, value) ->
|
||||
values.put(key.getSimpleName().toString(), value.getValue()));
|
||||
annotation.getElementValues().forEach((name, value) -> values
|
||||
.put(name.getSimpleName().toString(), value.getValue()));
|
||||
return values;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ class TypeElementMembers {
|
||||
processField(field);
|
||||
}
|
||||
try {
|
||||
this.fieldValuesParser.getFieldValues(element).forEach((key, value) -> {
|
||||
if (!this.fieldValues.containsKey(key)) {
|
||||
this.fieldValues.put(key, value);
|
||||
this.fieldValuesParser.getFieldValues(element).forEach((name, value) -> {
|
||||
if (!this.fieldValues.containsKey(name)) {
|
||||
this.fieldValues.put(name, value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -62,7 +62,8 @@ class TypeUtils {
|
||||
|
||||
static {
|
||||
Map<String, TypeKind> primitives = new HashMap<>();
|
||||
PRIMITIVE_WRAPPERS.forEach((key, value) -> primitives.put(value.getName(), key));
|
||||
PRIMITIVE_WRAPPERS.forEach(
|
||||
(kind, wrapperClass) -> primitives.put(wrapperClass.getName(), kind));
|
||||
WRAPPER_TO_PRIMITIVE = primitives;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user