You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Abe White (JIRA)" <ji...@apache.org> on 2006/10/27 19:05:17 UTC
[jira] Resolved: (OPENJPA-68) PCClassFileTransformer.isEnhanced()
fails because PersistenceCapable package name is wrong
[ 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