Polish
This commit is contained in:
@@ -53,16 +53,13 @@ public class EndpointMBeanExportAutoConfiguration {
|
||||
@Bean
|
||||
public EndpointMBeanExporter endpointMBeanExporter(MBeanServer server) {
|
||||
EndpointMBeanExporter mbeanExporter = new EndpointMBeanExporter();
|
||||
|
||||
String domain = this.properties.getDomain();
|
||||
if (StringUtils.hasText(domain)) {
|
||||
mbeanExporter.setDomain(domain);
|
||||
}
|
||||
mbeanExporter.setServer(server);
|
||||
|
||||
mbeanExporter.setEnsureUniqueRuntimeObjectNames(this.properties.isUniqueNames());
|
||||
mbeanExporter.setObjectNameStaticProperties(this.properties.getStaticNames());
|
||||
|
||||
return mbeanExporter;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
|
||||
|
||||
private FieldValuesParser fieldValuesParser;
|
||||
|
||||
private ElementExcludeFilter elementExcludeFilter = new ElementExcludeFilter();
|
||||
private TypeExcludeFilter typeExcludeFilter = new TypeExcludeFilter();
|
||||
|
||||
protected String configurationPropertiesAnnotation() {
|
||||
return CONFIGURATION_PROPERTIES_ANNOTATION;
|
||||
@@ -179,7 +179,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
|
||||
VariableElement field = members.getFields().get(name);
|
||||
Element returnType = this.processingEnv.getTypeUtils().asElement(
|
||||
getter.getReturnType());
|
||||
boolean isExcluded = this.elementExcludeFilter.isExcluded(getter
|
||||
boolean isExcluded = this.typeExcludeFilter.isExcluded(getter
|
||||
.getReturnType());
|
||||
boolean isNested = isNested(returnType, field, element);
|
||||
boolean isCollection = this.typeUtils.isCollectionOrMap(getter
|
||||
|
||||
@@ -27,11 +27,11 @@ import javax.lang.model.type.TypeMirror;
|
||||
* @author Stephane Nicoll
|
||||
* @since 1.2.0
|
||||
*/
|
||||
class ElementExcludeFilter {
|
||||
class TypeExcludeFilter {
|
||||
|
||||
private final Set<String> excludes = new HashSet<String>();
|
||||
|
||||
public ElementExcludeFilter() {
|
||||
public TypeExcludeFilter() {
|
||||
add("java.io.Writer");
|
||||
add("java.io.PrintWriter");
|
||||
add("java.lang.ClassLoader");
|
||||
Reference in New Issue
Block a user