Skip to content

Commit 6d82234

Browse files
committed
ClassUtils: refactor setValue method
1 parent 1f31410 commit 6d82234

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/scijava/util/ClassUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ public static void setValue(final Field field, final Object instance,
363363
{
364364
try {
365365
field.setAccessible(true);
366-
field.set(instance, ConversionUtils
367-
.convert(value, field.getGenericType()));
366+
final Type fieldType = field.getGenericType();
367+
field.set(instance, ConversionUtils.convert(value, fieldType));
368368
}
369369
catch (final IllegalAccessException e) {
370370
throw new IllegalArgumentException("No access to field: " +

0 commit comments

Comments
 (0)