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

RFE top update compiler combo tests for repeating annotations

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • tools
    • None

      Webrev: http://sa.sfbay.sun.com/projects/langtools_data/8/8001457.0/

      Above webrev was approved with some comments/suggestions by Jon and Joe. This RFE will track the changes made to the combo tests based on the following comments:

      Helper.java
      1. enum constants like "IMPORTCONTAINERSTMTS" would be easier to read as "IMPORT_CONTAINER_STMTS."
      2. The code

       130 boolean ok = task.call();
       131 return ok;

      could be replaced by just

       130 return task.call();
      3. Have a few paragraphs of comments explaining the general framework of this set of tests.
      4. Move EXIT_ON_FAIL static initializer code from combo tests to Helper.java
      5. static import to reduce code from annoData.append(Helper.ContentVars.IMPORTCONTAINERSTMTS.getVal()) -> annoData.append(IMPORTCONTAINERSTMTS.getVal())
      6. Add overloaded "error" methods to have the code look like:
      error("TestCase =%s did not give correct warnings."+
                   "Expected Warning keys errorKey1 = %s errorKey2 = %s actualErrorKey %s",
                   clName, errorKey1, errorKey2, d.getCode(), contents);
      7. getFile() - Can skip the initialization of JavaFileObject
      8. StringJavaFileObject - URI.create() instead of new URI to skip the URI syntax exception.


      DeprecatedAnnoCombo.java
      1. Update TestCases enum to follow enum constant coding conventions
      2. DeprecatedonBoth -> DeprecatedOnBoth

      Add discussion in each combo test for the space of variables it is exploring, how the expected answer is computed etc.
      Can use package.* for test development or maintain the order of imports by alphabetical order.
      Can skip @compile for combo tests as @run-main will provide @build for these tests.

            sogoel Sonali Goel (Inactive)
            sogoel Sonali Goel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: