Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-68

PCClassFileTransformer.isEnhanced() fails because PersistenceCapable package name is wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • None
    • jpa
    • None
    • Win32, JDK1.5, OpenJPA 0.9.0-incubating

    Description

      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;
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            cklaasmeyer Corey Klaasmeyer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: