Closed drdamour closed 9 years ago
I wrote a simple test, but its passing on Java 1.8, and 1.7, can you please attach an actual failing sample & let me know what is the running environment?
// This test case in a test class.
@Test
public void issueTest() {
Validator validator = ValidatorBuilder.create()
.with(new SetterTester())
.with(new GetterTester())
.build();
validator.validate(PojoClassFactory.getPojoClass(TestClass.class));
}
// the following two classes are one separate class files each independent.
public class TestClass {
private Map<String, SomeType[]> myMap;
public Map<String, SomeType[]> getMyMap() {
return myMap;
}
public void setMyMap(Map<String, SomeType[]> myMap) {
this.myMap = myMap;
}
public class SomeType {
}
indeed, the problem does not occur in 1.7. I am able to recreate it with your given test in 1.6.0_65
Do you support JRE 1.6? we're still restrained to 1.6 in some of our legacy systems
Let me test on 1.6 and update this.
OpenPojo-0.8.1 is out with the fix, please update and let me know if you see any other issues.
finally got around to testing this, works! thanks!
for a field, i believe it's because the type of the value is not considered paramaterized.
Specifically
in ParameterizableFactory
because GenericArrayType is return from Resolver.resolve, but that's not a class<?>