Polish contribution

See gh-17962
pull/17984/head
Stephane Nicoll 5 years ago
parent 7ee3656188
commit 96596f8ecc

@ -136,8 +136,7 @@ class AutoConfigurationSorter {
}
Set<String> getClassesRequestedAfter(String className) {
Set<String> setOfClassesRequestedAfter = get(className).getAfter();
Set<String> classesRequestedAfter = new LinkedHashSet<>(setOfClassesRequestedAfter);
Set<String> classesRequestedAfter = new LinkedHashSet<>(get(className).getAfter());
this.classes.forEach((name, autoConfigurationClass) -> {
if (autoConfigurationClass.getBefore().contains(className)) {
classesRequestedAfter.add(name);

@ -17,7 +17,6 @@
package org.springframework.boot.autoconfigure.jmx;
import java.util.Hashtable;
import java.util.Map;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
@ -58,8 +57,7 @@ public class ParentAwareNamingStrategy extends MetadataNamingStrategy implements
@Override
public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException {
ObjectName name = super.getObjectName(managedBean, beanKey);
Map<String, String> keyPropertyList = name.getKeyPropertyList();
Hashtable<String, String> properties = new Hashtable<>(keyPropertyList);
Hashtable<String, String> properties = new Hashtable<>(name.getKeyPropertyList());
if (this.ensureUniqueRuntimeObjectNames) {
properties.put("identity", ObjectUtils.getIdentityHexString(managedBean));
}

Loading…
Cancel
Save