Polish "Refact iterator of Map with Java 8 forEach"
Closes gh-1451
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
|
||||
@@ -147,7 +147,7 @@ public class MethodMetadataReadingVisitor extends MethodVisitor implements Metho
|
||||
for (AnnotationAttributes annotationAttributes : attributesList) {
|
||||
AnnotationAttributes convertedAttributes = AnnotationReadingVisitorUtils.convertClassValues(
|
||||
"method '" + getMethodName() + "'", this.classLoader, annotationAttributes, classValuesAsString);
|
||||
convertedAttributes.forEach((attrName, attrValue) -> allAttributes.add(attrName, attrValue));
|
||||
convertedAttributes.forEach(allAttributes::add);
|
||||
}
|
||||
}
|
||||
return allAttributes;
|
||||
|
||||
@@ -455,7 +455,7 @@ public class MimeType implements Comparable<MimeType>, Serializable {
|
||||
|
||||
private void appendTo(Map<String, String> map, StringBuilder builder) {
|
||||
map.forEach((key, val) -> {
|
||||
builder.append(";");
|
||||
builder.append(';');
|
||||
builder.append(key);
|
||||
builder.append('=');
|
||||
builder.append(val);
|
||||
|
||||
@@ -99,10 +99,8 @@ class StaxEventHandler extends AbstractStaxHandler {
|
||||
|
||||
private List<Namespace> getNamespaces(Map<String, String> namespaceMapping) {
|
||||
List<Namespace> result = new ArrayList<>();
|
||||
namespaceMapping.forEach(
|
||||
(prefix, namespaceUri)
|
||||
-> result.add(this.eventFactory.createNamespace(prefix, namespaceUri))
|
||||
);
|
||||
namespaceMapping.forEach((prefix, namespaceUri) ->
|
||||
result.add(this.eventFactory.createNamespace(prefix, namespaceUri)));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user