Closed GoogleCodeExporter closed 9 years ago
I'm having some difficulty isolating this into a test case. A class exactly as
you describe seems to work. Would you try Objectify 3.0b2 and let me know if
you see the same behavior?
If you can, try adding some code to FieldVisibilityTests.
Original comment by lhori...@gmail.com
on 11 Apr 2011 at 11:07
I get the exact same error (although line numbers in the stacktrace are a bit
different due to the different objectify version):
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at com.googlecode.objectify.impl.conv.EnumConverter.forPojo(EnumConverter.java:22)
at com.googlecode.objectify.impl.conv.Conversions.forPojo(Conversions.java:88)
at com.googlecode.objectify.impl.conv.CollectionConverter.forPojo(CollectionConverter.java:56)
at com.googlecode.objectify.impl.conv.Conversions.forPojo(Conversions.java:88)
at com.googlecode.objectify.impl.load.LeafSetter.importBasic(LeafSetter.java:81)
at com.googlecode.objectify.impl.load.LeafSetter.safeSet(LeafSetter.java:48)
at com.googlecode.objectify.impl.load.CollisionDetectingSetter.set(CollisionDetectingSetter.java:37)
at com.googlecode.objectify.impl.Transmog.load(Transmog.java:326)
at com.googlecode.objectify.impl.ConcreteEntityMetadata.toObject(ConcreteEntityMetadata.java:212)
at com.googlecode.objectify.impl.QueryImpl$ToObjectIterator.translate(QueryImpl.java:640)
at com.googlecode.objectify.impl.QueryImpl$ToObjectIterator.translate(QueryImpl.java:629)
at com.googlecode.objectify.util.TranslatingIterator.next(TranslatingIterator.java:35)
at com.googlecode.objectify.impl.QueryImpl.list(QueryImpl.java:470)
Also note that the class doesn't have any enums, so the occurrence of
EnumConverter in the stacktrace is weird.
Maybe I'm doing something wrong, I'll come back ASAP with more info.
Original comment by ioannis....@gmail.com
on 11 Apr 2011 at 11:16
Problem solved. I have another private member variable but without using
generics:
private Set bccRecipients = new HashSet();
This caused the confusing NPE.
thanks
Original comment by ioannis....@gmail.com
on 11 Apr 2011 at 11:27
Ah, that makes sense. The EnumConverter failed because every converter gets a
chance to make a conversion.
I will fix this issue.
Original comment by lhori...@gmail.com
on 11 Apr 2011 at 11:03
This is fixed. Note, however, that untyped fields are fairly dangerous. It's
like declaring a field of type Object; appengine's internals will seep into
view. For example, all numbers are converted to Long.
Original comment by lhori...@gmail.com
on 11 Apr 2011 at 11:12
Original issue reported on code.google.com by
ioannis....@gmail.com
on 11 Apr 2011 at 10:01