openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jieryn (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2187) metamodel generation with default package creates invalid class
Date Sat, 12 May 2012 14:08:49 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274015#comment-13274015
] 

jieryn commented on OPENJPA-2187:
---------------------------------

I'll attempt it, I eyeballed the change and it looked good. It seems like this would be better,
and more easily, tested with a dedicated unit test though.
                
> metamodel generation with default package creates invalid class
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-2187
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2187
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: lib
>    Affects Versions: 2.2.0
>            Reporter: jieryn
>            Assignee: Rick Curtis
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> Default package @Entity gets wrong metamodel class generated:
> {code}import javax.persistence.Basic;
> import javax.persistence.Entity;
> @Entity
> public final class BuggyMetamodel
> {
>   @Basic
>   private final String                                      string = "OpenJPA Rocks!";
> }
> {code}
> produces
> {code}/** 
>  *  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;
> }
> {code}
> Please notice the "package ;" which is invalid Java code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message