Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<property name="javac.debug" value="true"/>
<property name="javac.debuglevel" value="lines,vars,source"/>
<property name="javac.encoding" value="utf-8"/>
<property name="javac.release" value="8"/>
<property name="javac.release" value="11"/>
<property name="javac.nowarn" value="true"/>

<!-- javac and errorprone instructions from https://errorprone.info/docs/installation#ant -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,36 +105,39 @@ public void testEnum() {
assertEquals(0, new EnumTester().getGeneratedClasses().size());
}

/**
* This test requires a lot of care and feeding to keep track of which version of Java the test
* classes were built with, and what the current release version is.
*/
public void testJavacWeirdness() {
List<String> classNames = new JavacWeirdnessTester().getGeneratedClasses();
if (classNames.size() == 4) {
// javac8:
// JavacWeirdnessTester$1
if (classNames.size() == 3) {
// javac 11 with --release=11:
// javac 17 with --release=11:
// javac 21 with --release=11:
// JavacWeirdnessTester$2
// JavacWeirdnessTester$2Foo
// JavacWeirdnessTester$3Foo
assertFalse(classNames.get(0) + " should not contain Foo",
classNames.get(0).contains("Foo"));
assertFalse(classNames.get(1) + " should not contain Foo",
classNames.get(1).contains("Foo"));
assertTrue(classNames.get(1) + " should contain Foo", classNames.get(1).contains("Foo"));
assertTrue(classNames.get(2) + " should contain Foo", classNames.get(2).contains("Foo"));
assertTrue(classNames.get(3) + " should contain Foo", classNames.get(3).contains("Foo"));
} else if (classNames.size() == 5) {
// javac22:
// javac 22 with --release=11:
// JavacWeirdnessTester$1
// JavacWeirdnessTester$2
// JavacWeirdnessTester$1Foo
// JavacWeirdnessTester$2Foo
// JavacWeirdnessTester$3Foo
assertFalse(classNames.get(0) + " should not contain Foo",
classNames.get(0).contains("Foo"));
classNames.get(0).contains("Foo"));
assertFalse(classNames.get(1) + " should not contain Foo",
classNames.get(1).contains("Foo"));
classNames.get(1).contains("Foo"));
assertTrue(classNames.get(2) + " should contain Foo", classNames.get(2).contains("Foo"));
assertTrue(classNames.get(3) + " should contain Foo", classNames.get(2).contains("Foo"));
assertTrue(classNames.get(4) + " should contain Foo", classNames.get(3).contains("Foo"));
} else {
fail("Expected 4 or 5 classes, found " + classNames);
fail("Expected 3 classes, found " + classNames);
}
}

Expand Down
2 changes: 1 addition & 1 deletion doc/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
sourcepath="${gwt.root}/user/super/com/google/gwt/emul:${gwt.root}/dev/core/super/com/google/gwt/dev/jjs/intrinsic"
encoding="UTF-8"
access="public"
source="${javac.release}"
source="8"
packagenames="${JAVA_PKGS}"
docletpath="${project.build}/../build_tools/doctool/bin"
doclet="com.google.doctool.custom.JavaEmulSummaryDoclet">
Expand Down