mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
enum can be copied too
This commit is contained in:
@@ -576,7 +576,7 @@ public class ReflectionUtil {
|
||||
public static void copyFieldValue(@NotNull Object from, @NotNull Object to, @NotNull Field field)
|
||||
throws IllegalAccessException {
|
||||
Class<?> fieldType = field.getType();
|
||||
if (fieldType.isPrimitive() || fieldType.equals(String.class)) {
|
||||
if (fieldType.isPrimitive() || fieldType.equals(String.class) || fieldType.isEnum()) {
|
||||
field.set(to, field.get(from));
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user