filter out properties returning Object type, these appeared in Java 8

This commit is contained in:
bancika
2020-03-25 17:21:33 +01:00
parent 7e6f4e5727
commit 7c87ab075d
2 changed files with 5 additions and 2 deletions
@@ -152,7 +152,10 @@ public class ComponentProcessor {
for (Method getter : clazz.getMethods()) {
if (getter.getName().startsWith("get")) {
try {
if (getter.isAnnotationPresent(EditableProperty.class) && !getter.isAnnotationPresent(Deprecated.class)) {
if (getter.isAnnotationPresent(EditableProperty.class) && !getter.isAnnotationPresent(Deprecated.class)
// since Java 8 in generic classes we get properties of both the generic type and Object
// added this condition to skip Object property that we do not need
&& getter.getReturnType() != Object.class) {
EditableProperty annotation = getter.getAnnotation(EditableProperty.class);
String name;
if (annotation.name().equals("")) {
+1 -1
View File
@@ -101,7 +101,7 @@
outputdirectory="${build.dir}"
name="DIYLC"
jvmrequired="1.8"
copyright="Branislav Stojkovic, a.k.a. bancika"
copyright="2020 bancika"
displayname="DIY Layout Creator"
identifier="org.diylc.Desktop"
shortversion="${diylc.version}"