![]() If (!(().isAssignableFrom(paramObject.getClass()))) Answer1:įrom the source of those accessors it seems that the class declaring the field is not assignable from the runtimeInstance's class: it removes some artefacts from a string with the field name like this. ![]() ![]() PS2: processFieldName(var) processes the correct name of the field, i.e. PS1: The exact line causing the exception is this one: Long value = (Long) f.get(runtimeInstance) ![]() Has anyone encountered this issue before? Any clues? But that error message is throwing me away. I am suspecting that the runtimeInstance is not an object of the expected class. The error message is a bit misleading and I am not sure why it is mentioning a set operation whereas I am trying to preform a get. Long value = (Long) f.get(runtimeInstance) THe last lines of the application running are: Field f = classUnderTest.getDeclaredField(processFieldName(var)) Right now the error I get is the following: : Can not set int field to Īt (UnsafeFieldAccessorImpl.java:146)Īt (UnsafeFieldAccessorImpl.java:150)Īt (UnsafeFieldAccessorImpl.java:37)Īt (UnsafeIntegerFieldAccessorImpl.java:38)Īt (UnsafeIntegerFieldAccessorImpl.java:18)Īt .get(Field.java:358) I am trying to debug a Java application that is relying on Reflection.
0 Comments
Leave a Reply. |