Skip to content

Commit b9b94d9

Browse files
committed
Added rule for creation of Enum members
1 parent a37a25c commit b9b94d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

JavaBeanTester.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ private static Object buildValue(Class<?> clazz) throws InstantiationException,
115115

116116
} else if (clazz == char.class || clazz == Character.class) {
117117
return 'Y';
118-
118+
119+
} else if (clazz.isEnum()) {
120+
return clazz.getEnumConstants()[0];
121+
119122
// Add your own rules here
120123

121124
} else {

0 commit comments

Comments
 (0)