asolfre / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
0 stars 0 forks source link

Unregistered, chached entities thrown an NPE on get #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create class SomeClass with @Cache and @Entity
2. DO NOT register it
3. do a get: ofy.load().key(Key.create(SomeClass.class, "id").get()

What is the expected output?
An exception that says SomeClass is not registered.

What do you see instead?
A null pointer exception. Something about getting the cache expiry

What version of the product are you using? On what operating system?
4.0.b1

Please provide any additional information below.

Original issue reported on code.google.com by wayne.ra...@whatsnextsoftware.com on 18 Feb 2013 at 11:16

GoogleCodeExporter commented 9 years ago

Original comment by lhori...@gmail.com on 29 Mar 2013 at 7:57

GoogleCodeExporter commented 9 years ago
I cannot reproduce this. There is a test case in RegisterTests.java.

Right now you can create a Key<?> for unregistered classes and it will work 
fine. I'm not sure if this should or shouldn't throw an exception though.

Original comment by lhori...@gmail.com on 29 Mar 2013 at 8:13

GoogleCodeExporter commented 9 years ago
I figured it out and you now get a better exception msg.

Original comment by lhori...@gmail.com on 29 Mar 2013 at 8:44