openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abe White (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-68) PCClassFileTransformer.isEnhanced() fails because PersistenceCapable package name is wrong
Date Fri, 27 Oct 2006 17:05:17 GMT
     [ http://issues.apache.org/jira/browse/OPENJPA-68?page=all ]

Abe White resolved OPENJPA-68.
------------------------------

    Resolution: Fixed

Thanks, fixed.  (FTR, the correct name is org/apache/openjpa/enhance/PersistenceCapable)

> PCClassFileTransformer.isEnhanced() fails because PersistenceCapable package name is
wrong
> ------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-68
>                 URL: http://issues.apache.org/jira/browse/OPENJPA-68
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: Win32, JDK1.5, OpenJPA 0.9.0-incubating
>            Reporter: Corey Klaasmeyer
>            Priority: Critical
>
> On line 201, the fully qualified interface name should be "org/openjpa/enhance/PersistenceCapable"
not "openjpa/enhance/PersistenceCapable":
>     /**
>      * Analyze the bytecode to see if the given class definition implements
>      * {@link PersistenceCapable}.
>      */
>     private static boolean isEnhanced(byte[] b) {
>         ConstantPoolTable table = new ConstantPoolTable(b);
>         int idx = table.getEndIndex();
>         idx += 6; // skip access, cls, super
>         int ifaces = table.readUnsignedShort(idx);
>         int clsEntry, utfEntry;
>         String name;
>         for (int i = 0; i < ifaces; i++) {
>             idx += 2;
>             clsEntry = table.readUnsignedShort(idx);
>             utfEntry = table.readUnsignedShort(table.get(clsEntry));
>             name = table.readString(table.get(utfEntry));
>             if ("openjpa/enhance/PersistenceCapable".equals(name))
>                 return true;
>         }
>         return false;
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message