Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901994

jtreg needs to be updated for JT Harness 5.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jtreg4.2
    • None
    • tools
    • None
    • b08

      From Stuart Monteith,
      Hi,
       I just noticed I have hit this problem.

      HelpTree in jtharness-5.0.jar has this:
        private java.util.Comparator nodeComparator;
      Whereas in jtharness-4.6.jar it has:
        private static java.util.Comparator nodeComparator;

      i.e. the nodeComparator field is no longer a static field.

      This happened since adopt-openjdk started building with this:
          https://adopt-openjdk.ci.cloudbees.com/job/jtharness/lastSuccessfulBuild/artifact/jtharness-5.0.tar.gz

      BR,
        Stuart

      -----


      # HG changeset patch
      # User smonteith
      # Date 1498059859 -3600
      # Wed Jun 21 16:44:19 2017 +0100
      # Node ID 75cda45229ca989faf3e8ba83f45ccb951b1bb8f
      # Parent 33d0a6d64b82f5ca23b7b1eaadf74317b2204ecf
      Fix HelpTree field access

      diff -r 33d0a6d64b82 -r 75cda45229ca
      src/share/classes/com/sun/javatest/regtest/tool/Help.java
      --- a/src/share/classes/com/sun/javatest/regtest/tool/Help.java Mon
      Jun 12 14:35:46 2017 -0700
      +++ b/src/share/classes/com/sun/javatest/regtest/tool/Help.java Wed
      Jun 21 16:44:19 2017 +0100
      @@ -329,7 +329,7 @@
               try{
                   Field f = HelpTree.class.getDeclaredField("nodeComparator");
                   f.setAccessible(true);
      - f.set(null, new NodeComparator());
      + f.set(commandHelpTree, new NodeComparator());
               } catch (IllegalAccessException | IllegalArgumentException |
      NoSuchFieldException | SecurityException ignore) {
               }

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: