ExtraPropDefns might detect class name incorrectly

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P3
    • None
    • Affects Version/s: jt4.2
    • Component/s: tools
    • None

      ExtraPropDefns the class which handles "extra property definitions" for @requires clauses uses the following patterns to extract the class name java source:

          private static Pattern packagePattern =
                  Pattern.compile("package\\s+(((?:\\w+\\.)*)(?:\\w+))\\s*;");
          private static Pattern classPattern =
                  Pattern.compile("(?:public\\s+)?(?:class|enum|interface)\\s+(\\w+)");

      When I defined my class as:
      /**
       * The class to be invoked by jtreg prior Test Suite execution to
       * collect information about VM.
       */
      public class VMProps implements Callable<Map<String, String>> {
         ...
      }

      jtreg reported a very confusing message:

      java.lang.ClassNotFoundException: requires.to
      Error: failed to get JDK properties for /set/java/re/jdk/9/promoted/latest/binaries/solaris-x64/bin/java ; exit code 1


            Assignee:
            Jonathan Gibbons
            Reporter:
            Dmitry Fazunenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: