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
6 changes: 3 additions & 3 deletions .github/workflows/full-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Run all tests and builds all aspects of GWT using Java 11, 17, and 21. Runs
# Run all tests and builds all aspects of GWT using Java 17, 21, and 25. Runs
# nightly (plus or minus timzeones) on the main branch, and will also run right
# away on a push to a release branch. Release zips are uploaded as part of the
# build, though maven snapshots are not yet deployed.
Expand All @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ '11', '17', '21', '22' ]
java-version: [ '17', '21', '25' ]
steps:
- name: Checkout GWT itself into one directory
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 #v6.0.3
Expand All @@ -36,7 +36,7 @@ jobs:
repository: 'gwtproject/tools'
path: 'tools'
- name: Set up JDK ${{ matrix.java-version }}
# GWT requires Java 11+ to build
# GWT requires Java 17+ to build
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 #v5.3.0
with:
java-version: ${{ matrix.java-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/quick-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java-version: ['11', '17', '21', '22']
java-version: ['17', '21', '25']
steps:
- name: Checkout GWT itself into one directory
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 #v6.0.3
Expand All @@ -23,7 +23,7 @@ jobs:
repository: 'gwtproject/tools'
path: 'tools'
- name: Set up JDK ${{ matrix.java-version }}
# GWT presently requires Java 11+ to build
# GWT presently requires Java 17+ to build
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 #v5.3.0
with:
java-version: ${{ matrix.java-version }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

### Building the GWT SDK:

- In order to build GWT, `java` and `ant` are required in your system.
- In order to build GWT, `java` (minimum version 17) and `ant` are required in your system.

- You need the [GWT tools repository](https://github.com/gwtproject/tools/)
checked out and up-to-date. By default it is expected to be found at `../tools`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class JavaEmulSummaryDoclet implements Doclet {
private static final String OPT_TRIAGE_FILE = "-triageFile";
private static final String OPT_MISSING_PROPERTIES_DIR = "-missingProperties";
// should be aligned with the latest version that's tested by CI
private static final int MAX_JRE_VERSION = 22;
private static final int MAX_JRE_VERSION = 26;
// Lowest version for which missing method detection is reliable.
// The tool can run with older versions, but will ignore missing methods.
private static final int MIN_JRE_VERSION = 17;
Expand All @@ -83,7 +83,9 @@ public class JavaEmulSummaryDoclet implements Doclet {
"java.lang.Character#isJavaLetterOrDigit(char)",
"java.lang.String#getBytes(int, int, byte[], int)",
"java.lang.Class#isUnnamedClass()", // exists in 21 as a preview, removed
"java.lang.Enum#finalize()" // finalizers are ignored by GWT and to be removed from JVM
"java.lang.Enum#finalize()", // finalizers are ignored by GWT and to be removed from JVM
"java.util.Map#ofLazy(Set, Function)", // exists in 26 as a preview only
"java.util.List#ofLazy(int, IntFunction)" // exists in 26 as a preview only
);
private static final List<String> EXCLUDED_CLASSES = List.of("JsException");

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
members=java.util.Comparator#min(Object, Object)\
java.util.Comparator#max(Object, Object)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
members=java.lang.CharSequence#getChars(int, int, char[], int)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
members=java.lang.Math#unsignedMultiplyExact(int, int)\
java.lang.Math#unsignedMultiplyExact(long, long)\
java.lang.Math#unsignedMultiplyExact(long, int)\
java.lang.Math#powExact(int, int)\
java.lang.Math#powExact(long, int)\
java.lang.Math#unsignedPowExact(long, int)\
java.lang.Math#unsignedPowExact(int, int)\
java.lang.StrictMath#unsignedMultiplyExact(long, int)\
java.lang.StrictMath#unsignedMultiplyExact(long, long)\
java.lang.StrictMath#unsignedMultiplyExact(int, int)\
java.lang.StrictMath#powExact(long, int)\
java.lang.StrictMath#powExact(int, int)\
java.lang.StrictMath#unsignedPowExact(long, int)\
java.lang.StrictMath#unsignedPowExact(int, int)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
members=java.io.Reader#of(CharSequence)\
java.io.Reader#readAllLines()\
java.io.Reader#readAllAsString()
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
members=java.math.BigInteger#rootn(int)\
java.math.BigInteger#rootnAndRemainder(int)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
members=java.lang.String#equalsFoldCase(String)\
java.lang.String#compareToFoldCase(String)\
java.lang.String#UNICODE_CASEFOLD_ORDER
7 changes: 4 additions & 3 deletions common.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
<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="11"/>
<property name="javac.release" value="17"/>
<property name="javac.nowarn" value="true"/>

<!-- javac and errorprone instructions from https://errorprone.info/docs/installation#ant -->
<path id="errorprone.processorpath.ref">
<pathelement location="${gwt.tools.lib}/errorprone/error_prone_core-2.23.0-with-dependencies.jar"/>
<pathelement location="${gwt.tools.lib}/errorprone/dataflow-errorprone-3.34.0-eisop1.jar"/>
<pathelement location="${gwt.tools.lib}/errorprone/error_prone_core-2.42.0-with-dependencies.jar"/>
<pathelement location="${gwt.tools.lib}/errorprone/dataflow-errorprone-3.41.0-eisop1.jar"/>
</path>

<property name="junit.out" location="${project.build}/test"/>
Expand Down Expand Up @@ -187,6 +187,7 @@
<compilerarg value="-XDcompilePolicy=simple"/>
<compilerarg value="-processorpath"/>
<compilerarg pathref="mergedprocessorpath.ref"/>
<compilerarg value="--should-stop=ifError=FLOW"/>
<compilerarg value="-Xplugin:ErrorProne @{errorprone.args}" />
<javaccontents />
</javac>
Expand Down
18 changes: 9 additions & 9 deletions dev/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
<include name="apache/ant-zipscanner/ant-zipscanner-1.6.5-1-rebased.jar"/>
<include name="colt/colt-1.2.jar"/>
<include name="eclipse/3.33.0/*.jar"/>
<include name="objectweb/asm-9.6/asm-9.6.jar"/>
<include name="objectweb/asm-9.6/asm-commons-9.6.jar"/>
<include name="objectweb/asm-9.6/asm-util-9.6.jar"/>
<include name="objectweb/asm-9.10.1/asm-9.10.1.jar"/>
<include name="objectweb/asm-9.10.1/asm-commons-9.10.1.jar"/>
<include name="objectweb/asm-9.10.1/asm-util-9.10.1.jar"/>
<include name="guava/guava-33.0/guava-33.0.0-jre-rebased.jar"/>
<include name="guava/guava-33.0/failureaccess-1.0.2-rebased.jar"/>
<include name="icu4j/63.1/icu4j.jar"/>
Expand Down Expand Up @@ -119,9 +119,9 @@
<provider classname="org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer"/>
<provider classname="org.eclipse.jetty.apache.jsp.JettyJasperInitializer"/>
</service>
<zipfileset src="${gwt.tools.lib}/objectweb/asm-9.6/asm-9.6.jar"/>
<zipfileset src="${gwt.tools.lib}/objectweb/asm-9.6/asm-commons-9.6.jar"/>
<zipfileset src="${gwt.tools.lib}/objectweb/asm-9.6/asm-util-9.6.jar"/>
<zipfileset src="${gwt.tools.lib}/objectweb/asm-9.10.1/asm-9.10.1.jar"/>
<zipfileset src="${gwt.tools.lib}/objectweb/asm-9.10.1/asm-commons-9.10.1.jar"/>
<zipfileset src="${gwt.tools.lib}/objectweb/asm-9.10.1/asm-util-9.10.1.jar"/>
<zipfileset src="${gwt.tools.lib}/apache/tapestry-util-text-4.0.2.jar"/>
<zipfileset src="${gwt.tools.lib}/apache/ant-zipscanner/ant-zipscanner-1.6.5-1-rebased.jar"/>
<zipfileset src="${gwt.tools.lib}/colt/colt-1.2.jar"/>
Expand Down Expand Up @@ -217,9 +217,9 @@
<classpath>
<pathelement location="${gwt.tools.lib}/apache/ant-zipscanner/ant-zipscanner-1.6.5-1-rebased.jar"/>
<pathelement location="${gwt.tools.lib}/colt/colt-1.2.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.6/asm-9.6.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.6/asm-commons-9.6.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.6/asm-util-9.6.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.10.1/asm-9.10.1.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.10.1/asm-commons-9.10.1.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.10.1/asm-util-9.10.1.jar"/>
<pathelement
location="${gwt.tools.lib}/apache/commons/commons-collections-3.2.2.jar"/>
<fileset dir="${gwt.tools.lib}/eclipse/3.33.0">
Expand Down
1 change: 1 addition & 0 deletions dev/core/test/com/google/gwt/dev/GwtVersionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void testCompareTo() {
/**
* Test that GwtVersion.compareTo produced expected results.
*/
@SuppressWarnings("SelfAssertion")
public void testEquals() {
GwtVersion v1 = new GwtVersion("0.0.0");
assertEquals(v1, v1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ protected void validateCompilationState(String... generatedTypeNames) {
// Not always true due to caching! A source unit for FOO can b
// identical to the generated FOO and already be cached.
// assertTrue(unit.isGenerated());
assertNotNull(generatedTypes.remove(className));
assertTrue(generatedTypes.remove(className));
} else {
String partialPath = className.replace('.', '/') + ".java";
assertTrue(resourcePathNames.contains(partialPath));
// TODO: Validate the source file matches the resource.
assertNotNull(resourcePathNames.remove(partialPath));
assertTrue(resourcePathNames.remove(partialPath));
}
}
// The mutable sets should be empty now.
Expand Down
2 changes: 2 additions & 0 deletions dev/core/test/com/google/gwt/dev/util/StringKeyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private static <T extends Comparable<T>> void assertLT(T a, T b) {
assertTrue(a.compareTo(b) < 0);
}

@SuppressWarnings("SelfAssertion")
public void test() {
StringKey a = new KeyA("hello");
StringKey b = new KeyB("world");
Expand All @@ -64,6 +65,7 @@ public void test() {
assertGT(b, a);
}

@SuppressWarnings("SelfAssertion")
public void testNull() {
StringKey a = new KeyA(null);
StringKey b = new KeyB(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public boolean isEqualsCheckable() {
}

//-----------------------------------------------------------------------
@SuppressWarnings("SelfAssertion")
public void testObjectEqualsSelf() {
Object obj = makeObject();
assertEquals("A Object should equal itself", obj, obj);
Expand Down
2 changes: 1 addition & 1 deletion maven/poms/gwt/pom-template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</licenses>
<properties>
<jetty.version>9.4.58.v20250814</jetty.version>
<asm.version>9.6</asm.version>
<asm.version>9.10.1</asm.version>
</properties>
<developers>
<developer>
Expand Down
4 changes: 2 additions & 2 deletions user/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
<pathelement location="${gwt.tools.lib}/cglib/cglib-3.1.jar"/>
<pathelement location="${gwt.tools.lib}/mockito/1.9.5/mockito-all-1.9.5.jar"/>
<pathelement location="${gwt.tools.lib}/objenesis/objenesis-1.2.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.6/asm-9.6.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.6/asm-commons-9.6.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.10.1/asm-9.10.1.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-9.10.1/asm-commons-9.10.1.jar"/>
<pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar"/>
<pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar"/>
<pathelement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeMap;
Expand Down Expand Up @@ -931,7 +932,7 @@ private void initReplacements(TreeLogger logger, ResourceContext context,
* be be worth the effort to simplify this.
*/

if (context.getCachedData(KEY_HAS_CACHED_DATA, Boolean.class) != Boolean.TRUE) {
if (!Objects.equals(context.getCachedData(KEY_HAS_CACHED_DATA, Boolean.class), Boolean.TRUE)) {

ConfigurationProperty prop;
TreeSet<String> reservedPrefixes = new TreeSet<String>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
Expand Down Expand Up @@ -695,7 +696,7 @@ public void init(TreeLogger logger, ResourceContext context) throws UnableToComp

@SuppressWarnings("unchecked")
private void initReplacement(ResourceContext context) {
if (context.getCachedData(KEY_HAS_CACHED_DATA, Boolean.class) != Boolean.TRUE) {
if (!Objects.equals(context.getCachedData(KEY_HAS_CACHED_DATA, Boolean.class), Boolean.TRUE)) {

context.putCachedData(KEY_SHARED_METHODS, new IdentityHashMap<JMethod, String>());
context.putCachedData(KEY_BY_CLASS_AND_METHOD, new IdentityHashMap<JClassType, Map<String,
Expand Down
3 changes: 2 additions & 1 deletion user/src/com/google/gwt/uibinder/rebind/BundleWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.google.gwt.uibinder.rebind.model.ImplicitImageResource;

import java.util.Collection;
import java.util.Objects;
import java.util.Set;

/**
Expand Down Expand Up @@ -117,7 +118,7 @@ private void writeBundleClass() {
for (ImplicitDataResource data : bundleClass.getDataMethods()) {
writer.write("@Source(\"%s\")", data.getSource());
writer.newline();
if (data.getDoNotEmbed() == Boolean.TRUE) {
if (Objects.equals(data.getDoNotEmbed(), Boolean.TRUE)) {
writer.write("@DoNotEmbed");
writer.newline();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ protected <T> T ensureMutable(T object) {
return object;
}
if (object instanceof BaseProxy) {
@SuppressWarnings("unchecked")
// noinspection unchecked
T toReturn = (T) request.edit((BaseProxy) object);
return toReturn;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static <T> T __intercept(AutoBean<?> bean, T returnValue) {
* delegate to the edit() method for wiring up the context.
*/
if (returnValue instanceof BaseProxy) {
@SuppressWarnings("unchecked")
// noinspection unchecked
T toReturn = (T) context.editProxy((BaseProxy) returnValue);
return toReturn;
}
Expand Down
1 change: 1 addition & 0 deletions user/test/com/google/gwt/core/interop/JsExportTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public void testClinit_staticField() {
namespace = "$global.woo.StaticInitializerStaticField.InterfaceWithField", name = "STATIC")
private static native Object getStaticInitializerStaticFieldInterfaceStatic();

@SuppressWarnings("ImpossibleNullComparison")
public void testClinit_staticMethod() {
assertNotNull(getStaticInitializerStaticMethod());
}
Expand Down
1 change: 1 addition & 0 deletions user/test/com/google/gwt/dev/jjs/test/JsoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ public final boolean equalMethod(Object o) {
}
}

@SuppressWarnings("SelfAssertion")
public void testEquality() {
JavaScriptObject jso = makeJSO();
assertEquals(jso, jso);
Expand Down
1 change: 1 addition & 0 deletions user/test/com/google/gwt/dev/jjs/test/NativeLongTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public void testCasts() {
assertEquals(0x1234, (short) LONG_1234);
}

@SuppressWarnings("SelfAssertion")
public void testConstants() {
assertEquals(LONG_5DEECE66D, LONG_5DEECE66D);
assertTrue(LONG_5DEECE66D > 0L);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void testCharAt() {
assertEquals('b', "abc".charAt(1));
}

@SuppressWarnings("SelfAssertion")
public void testConcat() {
assertEquals("abcdef", "abc" + "def");
assertEquals("abcdef", "abc".concat("def"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public int getCompatibilityVersion() {
/** Return a new, empty {@link Object} to used for testing. */
public abstract Object makeObject();

@SuppressWarnings("SelfAssertion")
public void testObjectEqualsSelf() {
Object obj = makeObject();
assertEquals("A Object should equal itself", obj, obj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public String getModuleName() {
return "com.google.gwt.emultest.EmulSuite";
}

@SuppressWarnings("StringJoin")
public void testJoin() {
assertEquals("", String.join("", ""));
assertEquals("", String.join(",", ""));
Expand Down
4 changes: 4 additions & 0 deletions user/test/com/google/gwt/junit/client/GWTTestCaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@
throw throwable;
}
testThrowsNonSerializableException();
}

Check warning on line 117 in user/test/com/google/gwt/junit/client/GWTTestCaseTest.java

View workflow job for this annotation

GitHub Actions / build (21)

[checkstyle] reported by reviewdog 🐶 Line matches the illegal pattern 'more than one blank line'. Raw Output: /home/runner/work/gwt/gwt/gwt/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java:117:0: info: Line matches the illegal pattern 'more than one blank line'. (com.puppycrawl.tools.checkstyle.checks.regexp.RegexpCheck)


@SuppressWarnings("SelfAssertion")
public void testAssertEqualsDouble() {
assertEquals(0.0, 0.0, 0.0);
assertEquals(1.1, 1.1, 0.0);
Expand All @@ -134,6 +135,7 @@
assertNotEquals(-2.0, -1.0, 0.1);
}

@SuppressWarnings("SelfAssertion")
public void testAssertEqualsFloat() {
assertEquals(0.0f, 0.0f, 0.0f);
assertEquals(1.1f, 1.1f, 0.0f);
Expand All @@ -151,6 +153,7 @@
assertNotEquals(-2.0f, -1.0f, 0.1f);
}

@SuppressWarnings("SelfAssertion")
public void testAssertEqualsIntInt() {
assertEquals(5, 5);
assertEquals("msg", 5, 5);
Expand All @@ -166,6 +169,7 @@
assertEquals("msg", 5, 4);
}

@SuppressWarnings("SelfAssertion")
public void testAssertEqualsObjectObject() {
assertEquals(obj1, obj1Equal);
assertEquals("msg", obj1, obj1);
Expand Down
2 changes: 2 additions & 0 deletions user/test/com/google/gwt/storage/client/MapInterfaceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ public void testEntrySetSetValueSameValue() {
assertInvariants(map);
}

@SuppressWarnings("SelfAssertion")
public void testEqualsForEqualMap() {
final Map<K, V> map;
try {
Expand Down Expand Up @@ -841,6 +842,7 @@ public void disabled_testEqualsForSmallerMap() {
assertFalse(map.equals(smallerMap));
}

@SuppressWarnings("SelfAssertion")
public void testEqualsForEmptyMap() {
final Map<K, V> map;
try {
Expand Down
Loading
Loading