You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2022/04/05 14:28:36 UTC

[tomcat] branch 8.5.x updated: Fix missing strings

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 0c72b67bd8 Fix missing strings
0c72b67bd8 is described below

commit 0c72b67bd895fd36b8605d7b8887368a7e36e6dc
Author: remm <re...@apache.org>
AuthorDate: Tue Apr 5 16:24:04 2022 +0200

    Fix missing strings
---
 java/org/apache/catalina/core/DefaultInstanceManager.java | 4 ++--
 java/org/apache/catalina/core/LocalStrings.properties     | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/core/DefaultInstanceManager.java b/java/org/apache/catalina/core/DefaultInstanceManager.java
index c104d4582a..c0c17829b2 100644
--- a/java/org/apache/catalina/core/DefaultInstanceManager.java
+++ b/java/org/apache/catalina/core/DefaultInstanceManager.java
@@ -707,7 +707,7 @@ public class DefaultInstanceManager implements InstanceManager {
             if (method.getName().equals(methodNameFromXml)) {
                 if (!Introspection.isValidLifecycleCallback(method)) {
                     throw new IllegalArgumentException(
-                            "Invalid " + annotation.getName() + " annotation");
+                            sm.getString("defaultInstanceManager.invalidAnnotation", annotation.getName()));
                 }
                 result = method;
             }
@@ -715,7 +715,7 @@ public class DefaultInstanceManager implements InstanceManager {
             if (method.isAnnotationPresent(annotation)) {
                 if (currentMethod != null || !Introspection.isValidLifecycleCallback(method)) {
                     throw new IllegalArgumentException(
-                            "Invalid " + annotation.getName() + " annotation");
+                            sm.getString("defaultInstanceManager.invalidAnnotation", annotation.getName()));
                 }
                 result = method;
             }
diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties
index eefd403c82..8e10444ba9 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -125,6 +125,7 @@ containerBase.realm.stop=Error stopping old realm
 containerBase.threadedStartFailed=A child container failed during start
 containerBase.threadedStopFailed=A child container failed during stop
 
+defaultInstanceManager.invalidAnnotation=Invalid [{0}] annotation
 defaultInstanceManager.invalidInjection=Invalid method resource injection annotation
 defaultInstanceManager.postConstructNotFound=Post construct method [{0}] for class [{1}] is declared in deployment descriptor but cannot be found
 defaultInstanceManager.preDestroyNotFound=Pre destroy method [{0}] for class [{1}] is declared in deployment descriptor but cannot be found


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org