[hibernate-issues] [Hibernate-JIRA] Updated: (METAGEN-70) BasicAttributeVistor doesn't recognize subclasses of java.io.Serializeable as Attributes.

Hardy Ferentschik (JIRA) noreply at atlassian.com
Tue Jan 17 10:45:10 EST 2012


     [ http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik updated METAGEN-70:
-------------------------------------

    Description: 
Situation:
Interface _UnitPersistentValueIF_ extends _PersistentValueIF_.
Interface _PersistentValueIF_ extends _java.io.Serializable_.

Result:
The annotationprocessor creates attributes for element _PersistentValueIF_
The annotationprocessor doesn't create attributes for element _UnitPersistentValueIF_

Expected result:
The annotationprocessor creates for both _PersistentValueIF_ and _UnitPersistentValueIF_ the attributes.

I have debugged the annotationprocessor and this could be the solution:

In BasicAttributeVisitor.java in method _visitDeclared(DeclaredType declaredType, Element element)_
there is the following code:
{code}
  if ( "java.io.Serializable".equals( interfaceElement.getQualifiedName().toString() ) ) {
{code}
This code should also take into account its superclasses (or interfaces).

Can this be done with 'java.lang.model' ?






  was:
Situation:
Interface 'UnitPersistentValueIF' extends 'PersistentValueIF'.
Interface 'PersistentValueIF' extends 'java.io.Serializable'.

Result:
The annotationprocessor creates attributes for element 'PersistentValueIF'
The annotationprocessor doesn't create attributes for element 'UnitPersistentValueIF'

Expected result:
The annotationprocessor creates for both 'PersistentValueIF' and 'UnitPersistentValueIF' the attributes.

I have debugged the annotationprocessor and this could be the solution:
In BasicAttributeVisitor.java in method visitDeclared(DeclaredType declaredType, Element element)
there is the following code:
  if ( "java.io.Serializable".equals( interfaceElement.getQualifiedName().toString() ) ) {
This code should also take into account its superclasses (or interfaces).
Can this be done with 'java.lang.model' ?







> BasicAttributeVistor doesn't recognize subclasses of java.io.Serializeable as Attributes.
> -----------------------------------------------------------------------------------------
>
>                 Key: METAGEN-70
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-70
>             Project: Hibernate Metamodel Generator
>          Issue Type: Bug
>          Components: processor
>    Affects Versions: 1.1.1.Final
>            Reporter: kk
>            Assignee: Hardy Ferentschik
>             Fix For: 1.x
>
>
> Situation:
> Interface _UnitPersistentValueIF_ extends _PersistentValueIF_.
> Interface _PersistentValueIF_ extends _java.io.Serializable_.
> Result:
> The annotationprocessor creates attributes for element _PersistentValueIF_
> The annotationprocessor doesn't create attributes for element _UnitPersistentValueIF_
> Expected result:
> The annotationprocessor creates for both _PersistentValueIF_ and _UnitPersistentValueIF_ the attributes.
> I have debugged the annotationprocessor and this could be the solution:
> In BasicAttributeVisitor.java in method _visitDeclared(DeclaredType declaredType, Element element)_
> there is the following code:
> {code}
>   if ( "java.io.Serializable".equals( interfaceElement.getQualifiedName().toString() ) ) {
> {code}
> This code should also take into account its superclasses (or interfaces).
> Can this be done with 'java.lang.model' ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list