OpenJPA
  1. OpenJPA
  2. OPENJPA-2187

metamodel generation with default package creates invalid class

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: lib
    • Labels:
      None

      Description

      Default package @Entity gets wrong metamodel class generated:

      import javax.persistence.Basic;
      import javax.persistence.Entity;
      
      @Entity
      public final class BuggyMetamodel
      {
        @Basic
        private final String                                      string = "OpenJPA Rocks!";
      }
      

      produces

      /** 
       *  Generated by OpenJPA MetaModel Generator Tool.
      **/
      
      package ;
      
      import javax.persistence.metamodel.SingularAttribute;
      
      @javax.persistence.metamodel.StaticMetamodel
      (value=BuggyMetamodel.class)
      @javax.annotation.Generated
      (value="org.apache.openjpa.persistence.meta.AnnotationProcessor6",date="Wed May 09 08:49:27 EDT 2012")
      public class BuggyMetamodel_ {
          public static volatile SingularAttribute<BuggyMetamodel,String> string;
      }
      

      Please notice the "package ;" which is invalid Java code.

        Activity

          People

          • Assignee:
            Rick Curtis
            Reporter:
            jieryn
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development