This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/tomcat-maven-plugin.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2ea8085 Fix Maven build warnings
2ea8085 is described below
commit 2ea8085d8a2428bc969684f267d99a356bac4ac4
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jan 27 15:48:45 2026 +0000
Fix Maven build warnings
---
.../java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java | 8 ++++----
.../main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git
a/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
b/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
index c02334e..3a2dba1 100644
---
a/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
+++
b/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
@@ -39,7 +39,7 @@ public final class EmbeddedRegistry
{
private static EmbeddedRegistry instance;
- private Set<Object> containers = new HashSet<Object>( 1 );
+ private Set<Object> containers = new HashSet<>( 1 );
/**
* Don't instantiate - use the instance through {@link #getInstance()}.
@@ -106,9 +106,9 @@ public final class EmbeddedRegistry
Object embedded = iterator.next();
try
{
- Method method = embedded.getClass().getMethod( "stop", null );
- method.invoke( embedded, null );
- embedded.getClass().getMethod( "destroy", null ).invoke(
embedded, null );
+ Method method = embedded.getClass().getMethod( "stop" );
+ method.invoke( embedded );
+ embedded.getClass().getMethod( "destroy" ).invoke( embedded );
iterator.remove();
}
catch ( NoSuchMethodException e )
diff --git
a/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
b/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
index ef6b707..3682eea 100644
---
a/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
+++
b/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
@@ -492,11 +492,11 @@ public class Tomcat7Runner
debugMessage("Constructing session manager with factory " +
sessionManagerFactoryClassName);
Class sessionManagerClass =
Class.forName(sessionManagerFactoryClassName);
- Object managerFactory = (Object) sessionManagerClass.newInstance();
+ Object managerFactory = sessionManagerClass.newInstance();
Method method =
managerFactory.getClass().getMethod("createSessionManager");
if (method != null) {
- Manager manager = (Manager) method.invoke(managerFactory,
null);
+ Manager manager = (Manager) method.invoke(managerFactory);
ctx.setManager(manager);
ctx.setCookies(cookies);
@@ -834,7 +834,7 @@ public class Tomcat7Runner
java.util.logging.LogManager.getLogManager().reset();
// Install slf4j bridge handler
- final Method method = clazz.getMethod( "install", null );
+ final Method method = clazz.getMethod( "install" );
method.invoke( null );
}
catch ( ClassNotFoundException e )
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]