T
Tomba
Hi,
I'm working with Java 5.0 and somehow I can't figure out what the
problem is here:
Executing the following code:
try {
setter.invoke(bean, new Object[] { value });
} catch (IllegalArgumentException ex) {
System.out.println("Setter: " + setter + "\nArgument: " +
value.getClass().toString());
ex.printStackTrace();
}
I get the following output:
Setter: public void util.Transformation.setRelative(boolean)
Argument: class java.lang.Boolean
java.lang.IllegalArgumentException: object is not an instance of
declaring class ...
The function defenately exists but the problem seems to be the
conversion with Boolean and boolean. Shouldn't Java actually make it
work by unboxing the Boolean to the primitive boolean?
Hope you can see what I'm missing here... :/
Thank you!
I'm working with Java 5.0 and somehow I can't figure out what the
problem is here:
Executing the following code:
try {
setter.invoke(bean, new Object[] { value });
} catch (IllegalArgumentException ex) {
System.out.println("Setter: " + setter + "\nArgument: " +
value.getClass().toString());
ex.printStackTrace();
}
I get the following output:
Setter: public void util.Transformation.setRelative(boolean)
Argument: class java.lang.Boolean
java.lang.IllegalArgumentException: object is not an instance of
declaring class ...
The function defenately exists but the problem seems to be the
conversion with Boolean and boolean. Shouldn't Java actually make it
work by unboxing the Boolean to the primitive boolean?
Hope you can see what I'm missing here... :/
Thank you!