Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4488357

JAF 1.0.1 needs to be recompiled and rereleased (re-open # 4366379)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.0.2
    • 1.0.1fcs
    • other-libs
    • 1.0.2
    • generic
    • generic
    • Not verified



      Name: krC82822 Date: 08/04/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      1) The problem
      The constructor javax.activation.ActivationDataFlavor( String mimeType , String
      humanPresentableName ) which is used internally by JavaMail does not work. To
      demonstrate run the code below: This fails with all versions of JavaMail and
      JDK.

      2) Source code
      import javax.activation.*;
      public class ActivationDataFlavorTest
      {
          public static void main( String[] args )
          {
              // Fatal line
              ActivationDataFlavor adf =
                  new ActivationDataFlavor( "text/plain" , "Plain text" );
              System.out.println( adf );
          }
      }

      3) Error messaage:
      Exception in thread "main" java.lang.IllegalAccessError: try to access field
      java.awt.datatransfer.DataFlavor.class$java$io$InputStream from class
      javax.activation.ActivationDataFlavor
              at javax.activation.ActivationDataFlavor.<init>
      (ActivationDataFlavor.java:126)
              at ActivationDataFlavorTest.main(ActivationDataFlavorTest.java:8)

      4) N/A

      5) Info:
      Disassembling javax.activation.ActivationDataFlavor shows that it it trying to
      access a package-private variable in java.awt.datatransfer.DataFlavor:
              static Class class$java$io$InputStream

      This implies that the compiler used to compile JAF 1.0.1 had a serious flaw in
      it. This bug was submitted before as Bug ID 4366379 but was closed erroneously,
      however the reason given when closing it explains the problem -
      JAF 1.0.1 must have been compiled with a JDK prior to 1.1.6 and has this
      problem with inner classes mentioned.

      I have tested recompiling my disassembled ActivationDataFlavor then adding it
      to activation.jar using JDK 1.3 & 1.4 and it works perfectly. However, if I
      understand the license correctly, I cannot then redistribute activation.jar
      with my application as I have modified it.
      Please recompile the JAF and rerelease it.
      (Review ID: 129018)
      ======================================================================

            bshannon Bill Shannon (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: