mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-20 19:20:04 +00:00
correct representation of enum literals as Java code, using valueOf
Change-Id: Ic9be5549a2ac6b26e5ffad96cf344a8cd2dd3ed9
This commit is contained in:
1 parent
00d11275a2
commit
faa7b9ff04
1 file changed
+1
-1
+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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user