Polishing
This commit is contained in:
@@ -495,8 +495,7 @@ public abstract class ReflectionUtils {
|
||||
mc.doWith(method);
|
||||
}
|
||||
catch (IllegalAccessException ex) {
|
||||
throw new IllegalStateException("Shouldn't be illegal to access method '" + method.getName()
|
||||
+ "': " + ex);
|
||||
throw new IllegalStateException("Shouldn't be illegal to access method '" + method.getName() + "': " + ex);
|
||||
}
|
||||
}
|
||||
if (clazz.getSuperclass() != null) {
|
||||
@@ -607,8 +606,7 @@ public abstract class ReflectionUtils {
|
||||
fc.doWith(field);
|
||||
}
|
||||
catch (IllegalAccessException ex) {
|
||||
throw new IllegalStateException(
|
||||
"Shouldn't be illegal to access field '" + field.getName() + "': " + ex);
|
||||
throw new IllegalStateException("Shouldn't be illegal to access field '" + field.getName() + "': " + ex);
|
||||
}
|
||||
}
|
||||
targetClass = targetClass.getSuperclass();
|
||||
@@ -630,8 +628,8 @@ public abstract class ReflectionUtils {
|
||||
throw new IllegalArgumentException("Destination for field copy cannot be null");
|
||||
}
|
||||
if (!src.getClass().isAssignableFrom(dest.getClass())) {
|
||||
throw new IllegalArgumentException("Destination class [" + dest.getClass().getName()
|
||||
+ "] must be same or subclass as source class [" + src.getClass().getName() + "]");
|
||||
throw new IllegalArgumentException("Destination class [" + dest.getClass().getName() +
|
||||
"] must be same or subclass as source class [" + src.getClass().getName() + "]");
|
||||
}
|
||||
doWithFields(src.getClass(), new FieldCallback() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user