mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
filter out properties returning Object type, these appeared in Java 8
This commit is contained in:
@@ -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("")) {
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user