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

Old build of langtools fails when SKIP_BOOT_CYCLE=false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2 P2
    • None
    • 8
    • tools
    • None
    • generic
    • generic

      The fix for JDK-8007113 removed Class.isAnnotationPresent and replaced it with a default method in an interface implemented by Class. When the resulting jdk build is used to compile test.java which contains a reference to Class.isAnnotationPresent, with option -source 7, an error results saying that method isAnnotationPresent cannot be found in class Class.

      The -source 7 causes javac to ignore the default methods in .class files resulting in the error.

      This error occurs when a SKIP_BOOT_CYCLE=false build is done using the old build system.
      First, the jdk is built with the boot jdk, and then the jdk is rebuilt using the just built jdk. In this rebuild, the langtoold build is run with -source 7 causing the above failure. The -source 7 option results from build.properties setting ant property
          boot.javac.source=7

      I don't know what happens if a SKIP_BOOT_CYCLE=false build is done with the new build system.

      The fix MIGHT be to fix the old langtools build.xml to determine the version of the bootjdk and set the -source option accordingly.

      Whether or not the behavior of javac -source 7 .... in the presence of default methods is correct is TBD.


            jjg Jonathan Gibbons (Inactive)
            jjh James Holmlund (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: