google-code-export / objectify-appengine

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

Objectified inner class throws exception #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Issue opening asked in 
http://groups.google.com/group/objectify-appengine/browse_thread/thread/bddb9ac7
423c6920

The registration of the inner class done in static testInner() below
throws an IllegalStateException with message "There must be a no-arg
constructor for net.didierdurand.objectifytest.server.Class3$Class30"
although the required no-arg constructor exists.

Sample code to reproduce issue:

package net.didierdurand.objectifytest.server;

import com.googlecode.objectify.ObjectifyService;
import com.googlecode.objectify.annotation.Entity;

public class Class3 {

        @Entity
        private class Class30 {

                @SuppressWarnings("unused")
                public Class30() {
                }
        }

        public static void testInner() {
                ObjectifyService.begin();
                ObjectifyService.register(Class30.class);
        }
} 

Original issue reported on code.google.com by durand.didier on 22 Sep 2010 at 3:37

GoogleCodeExporter commented 9 years ago
This error message should say "Unable to register x.x.x.x.Blah$Blah, inner 
classes must be static".

Original comment by lhori...@gmail.com on 27 Sep 2010 at 5:46

GoogleCodeExporter commented 9 years ago
Now has a better error message

Original comment by lhori...@gmail.com on 18 Mar 2011 at 5:15