mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-01 19:15:52 +01:00
added missing default values to plugin.xml and module.xml
This commit is contained in:
@@ -99,6 +99,8 @@ import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import static javax.lang.model.util.ElementFilter.methodsIn;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -372,6 +374,15 @@ public final class ScmAnnotationProcessor extends AbstractProcessor {
|
||||
attributes.put(entry.getKey().getSimpleName().toString(),
|
||||
getValue(entry.getValue()));
|
||||
}
|
||||
|
||||
// add default values
|
||||
for (ExecutableElement meth : methodsIn(am.getAnnotationType().asElement().getEnclosedElements())) {
|
||||
String attribute = meth.getSimpleName().toString();
|
||||
AnnotationValue defaultValue = meth.getDefaultValue();
|
||||
if (defaultValue != null && !attributes.containsKey(attribute)) {
|
||||
attributes.put(attribute, getValue(defaultValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user