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

javac compile errors while autoboxing a Boolean/Integer

XMLWordPrintable

    • x86
    • windows_xp

      OPERATING SYSTEM(S):
      =======================
      Linux and Windows.

      FULL JDK VERSION(S):
      =======================
      java version "1.6.0_01"
      Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode)

      DESCRIPTION:
      ======================
      javac compile errors while autoboxing a Boolean/Integer.
      while autoboxing a Boolean javac throws Fatal Error: Unable to find method booleanValue.

      The same is true for Integer, javac throws Fatal Error: Unable to find method intValue.

      I'm seeing javac compile errors that seem to be related to the use of autoboxing.

      For example, when autoboxing a Boolean, I get this error:

          [javac] /extra/JDK6_BUILD/WEB/ws/build/build2/Test.java:6: cannot find symbol
          [javac] symbol : method booleanValue()
          [javac] location: class java.lang.Boolean
          [javac] boolean b = (Boolean) o[1];
          [javac] ^
          [javac] Fatal Error: Unable to find method booleanValue

      And when autoboxing an Integer, I get this error,

          [javac] location: class java.lang.Integer
          [javac] int i = (Integer) o[1];
          [javac] ^
          [javac] Fatal Error: Unable to find method intValue

      This only seems to happen when there is more than one javac process running in parallel, which we do in our build environment.

      Text of error messages:
      ===================
      Verifying compiler location:
      jar:file:/C:/build/forwindows/NewFolder/jdk6_01/lib/tools.jar!/com/sun/tools/javac/Main.class
      Fatal Error: Unable to find method booleanValue
      Failure in thread 0 while compiling C:\defects\117343\117343\temp2\build_0\Test.
      java
      C:\defects\117343\117343\temp2\build_3\Test.java:4: cannot find symbol
      symbol : method booleanValue()
      location: class java.lang.Boolean
                      boolean b = (Boolean) o[1];
                                  ^
      Fatal Error: Unable to find method booleanValue
      Failure in thread 3 while compiling C:\defects\117343\117343\temp2\build_3\Test.
      java
      C:\defects\117343\117343\temp2\build_2\Test.java:4: cannot find symbol
      symbol : method booleanValue()
      location: class java.lang.Boolean
                      boolean b = (Boolean) o[1];

      Recreation Steps:
      =================
      There is a tool created for recreating the problem. The tool generates the source files for however many threads are desired and then compiles them simultaneously.

      The tool can be downloaded from here:

      ftp://ftp.emea.ibm.com/fromibm/other/ibm-20070629.zip

            jjg Jonathan Gibbons
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: