This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 17d97f005b Fix IDE warnings
17d97f005b is described below
commit 17d97f005b0ef16ad3c23018a3e9e43e9e80cd3b
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Oct 22 15:40:56 2026 +0100
Fix IDE warnings
---
test/org/apache/naming/TestNamingContext.java | 2 +-
test/org/apache/naming/TestSelectorContextConcurrency.java | 2 +-
test/org/apache/naming/factory/TestLookupFactory.java | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/org/apache/naming/TestNamingContext.java
b/test/org/apache/naming/TestNamingContext.java
index c3aae8dc30..670d2d92ee 100644
--- a/test/org/apache/naming/TestNamingContext.java
+++ b/test/org/apache/naming/TestNamingContext.java
@@ -101,7 +101,7 @@ public class TestNamingContext extends TomcatBaseTest {
public void testResourceLinkWithoutGlobalName() {
// Use a private context to keep the global context validation out of
// the way, whatever test order is used within the JVM
- Context context = new NamingContext(new Hashtable<String,Object>(),
"test");
+ Context context = new NamingContext(new Hashtable<>(), "test");
ResourceLinkFactory.setGlobalContext(context);
// A resource link without a global name is a configuration error that
diff --git a/test/org/apache/naming/TestSelectorContextConcurrency.java
b/test/org/apache/naming/TestSelectorContextConcurrency.java
index e1f4c86c9e..8ab8b13094 100644
--- a/test/org/apache/naming/TestSelectorContextConcurrency.java
+++ b/test/org/apache/naming/TestSelectorContextConcurrency.java
@@ -131,7 +131,7 @@ public class TestSelectorContextConcurrency {
private static final long serialVersionUID = 1L;
@Override
- public Enumeration<String> keys() {
+ public synchronized Enumeration<String> keys() {
try {
Thread.sleep(200);
} catch (InterruptedException e) {
diff --git a/test/org/apache/naming/factory/TestLookupFactory.java
b/test/org/apache/naming/factory/TestLookupFactory.java
index b73bbe7682..de66706eaf 100644
--- a/test/org/apache/naming/factory/TestLookupFactory.java
+++ b/test/org/apache/naming/factory/TestLookupFactory.java
@@ -88,7 +88,7 @@ public class TestLookupFactory extends TomcatBaseTest {
@Test
public void testTypeMismatchIsStillReported() throws Exception {
- TesterWebapp webapp = startWebapp();
+ startWebapp();
Context container = ContextBindings.getClassLoader();
container.bind("comp/env/ref", new LookupRef(String.class.getName(),
"java:comp/env/target"));
@@ -174,6 +174,7 @@ public class TestLookupFactory extends TomcatBaseTest {
Files.createDirectories(source.getParent());
Files.write(source, ("package tester;\npublic class Marker
{\n}\n".getBytes(StandardCharsets.UTF_8)));
ByteArrayOutputStream compilerOutput = new ByteArrayOutputStream();
+ @SuppressWarnings("null")
int result = compiler.run(null, compilerOutput, compilerOutput, "-d",
classes.toString(),
source.toString());
Assert.assertEquals("The class of the web application could not be
compiled: " + compilerOutput, 0, result);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]