correct representation of enum literals as Java code, using valueOf

Change-Id: Ic9be5549a2ac6b26e5ffad96cf344a8cd2dd3ed9
This commit is contained in:
Axel Uhl committed 2017-08-25 01:02:50 +02:00
1 parent 00d11275a2
commit faa7b9ff04
1 file changed
+1 -1
@@ -254,7 +254,7 @@ public class QueryDefinitionParser {
return value.toString();
}
if (value instanceof Enum) {
return ((Enum<?>) value).name();
return value.getClass().getName()+".valueOf(\""+((Enum<?>) value).name()+"\")";
}
throw new IllegalArgumentException("Can't create literal for values of type " + value.getClass().getName());
}