Commit 4b7c6f61 authored by Phillip Webb's avatar Phillip Webb

Polish

parent f0bc3c08
...@@ -53,16 +53,13 @@ public class EndpointMBeanExportAutoConfiguration { ...@@ -53,16 +53,13 @@ public class EndpointMBeanExportAutoConfiguration {
@Bean @Bean
public EndpointMBeanExporter endpointMBeanExporter(MBeanServer server) { public EndpointMBeanExporter endpointMBeanExporter(MBeanServer server) {
EndpointMBeanExporter mbeanExporter = new EndpointMBeanExporter(); EndpointMBeanExporter mbeanExporter = new EndpointMBeanExporter();
String domain = this.properties.getDomain(); String domain = this.properties.getDomain();
if (StringUtils.hasText(domain)) { if (StringUtils.hasText(domain)) {
mbeanExporter.setDomain(domain); mbeanExporter.setDomain(domain);
} }
mbeanExporter.setServer(server); mbeanExporter.setServer(server);
mbeanExporter.setEnsureUniqueRuntimeObjectNames(this.properties.isUniqueNames()); mbeanExporter.setEnsureUniqueRuntimeObjectNames(this.properties.isUniqueNames());
mbeanExporter.setObjectNameStaticProperties(this.properties.getStaticNames()); mbeanExporter.setObjectNameStaticProperties(this.properties.getStaticNames());
return mbeanExporter; return mbeanExporter;
} }
......
...@@ -75,7 +75,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor ...@@ -75,7 +75,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
private FieldValuesParser fieldValuesParser; private FieldValuesParser fieldValuesParser;
private ElementExcludeFilter elementExcludeFilter = new ElementExcludeFilter(); private TypeExcludeFilter typeExcludeFilter = new TypeExcludeFilter();
protected String configurationPropertiesAnnotation() { protected String configurationPropertiesAnnotation() {
return CONFIGURATION_PROPERTIES_ANNOTATION; return CONFIGURATION_PROPERTIES_ANNOTATION;
...@@ -179,7 +179,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor ...@@ -179,7 +179,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
VariableElement field = members.getFields().get(name); VariableElement field = members.getFields().get(name);
Element returnType = this.processingEnv.getTypeUtils().asElement( Element returnType = this.processingEnv.getTypeUtils().asElement(
getter.getReturnType()); getter.getReturnType());
boolean isExcluded = this.elementExcludeFilter.isExcluded(getter boolean isExcluded = this.typeExcludeFilter.isExcluded(getter
.getReturnType()); .getReturnType());
boolean isNested = isNested(returnType, field, element); boolean isNested = isNested(returnType, field, element);
boolean isCollection = this.typeUtils.isCollectionOrMap(getter boolean isCollection = this.typeUtils.isCollectionOrMap(getter
......
...@@ -27,11 +27,11 @@ import javax.lang.model.type.TypeMirror; ...@@ -27,11 +27,11 @@ import javax.lang.model.type.TypeMirror;
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.2.0 * @since 1.2.0
*/ */
class ElementExcludeFilter { class TypeExcludeFilter {
private final Set<String> excludes = new HashSet<String>(); private final Set<String> excludes = new HashSet<String>();
public ElementExcludeFilter() { public TypeExcludeFilter() {
add("java.io.Writer"); add("java.io.Writer");
add("java.io.PrintWriter"); add("java.io.PrintWriter");
add("java.lang.ClassLoader"); add("java.lang.ClassLoader");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment