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.
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.
- relates to
-
JDK-7151010 Add compiler support for repeating annotations
-
- Closed
-
-
JDK-7195131 Update 2 compiler combo tests for repeating annotations to include package and default use cases
-
- Closed
-
-
JDK-8002157 Write combo compiler tests for repeating annotations for JDK8
-
- Closed
-