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

markt 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 95130d64b3 Silence IDE warnings
95130d64b3 is described below

commit 95130d64b3b26bddc495b7196940ff3ac8f746df
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Sep 9 19:03:31 2022 +0100

    Silence IDE warnings
---
 test/org/apache/el/util/TestMessageFactory.java | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/test/org/apache/el/util/TestMessageFactory.java 
b/test/org/apache/el/util/TestMessageFactory.java
index 297ddeac1b..0b354bf073 100644
--- a/test/org/apache/el/util/TestMessageFactory.java
+++ b/test/org/apache/el/util/TestMessageFactory.java
@@ -24,6 +24,8 @@ import org.junit.Test;
 
 public class TestMessageFactory {
 
+    private static final Integer ZERO = Integer.valueOf(0);
+
     MessageFactory messageFactory = new 
MessageFactory(ResourceBundle.getBundle("org.apache.el.util.TestStrings"));
 
     @Test
@@ -32,7 +34,8 @@ public class TestMessageFactory {
         // Trailing '0" is an extra Number argument, not printed by the
         // message pattern. It reflects the case when a translation has not
         // been updated with new arguments.
-        String result = 
messageFactory.getInternal("messageFactory.formatNone", new BigDecimal(input), 
0 /*ignored*/);
+        String result =
+                messageFactory.getInternal("messageFactory.formatNone", new 
BigDecimal(input), ZERO /*ignored*/);
         // Should be unchanged
         Assert.assertEquals(input, result);
     }
@@ -48,7 +51,8 @@ public class TestMessageFactory {
     @Test
     public void testFormatChoice() {
         String input = "1E+2";
-        String result = 
messageFactory.getInternal("messageFactory.formatChoice", new 
BigDecimal(input), 0 /*ignored*/);
+        String result =
+                messageFactory.getInternal("messageFactory.formatChoice", new 
BigDecimal(input), ZERO /*ignored*/);
         // Should be formatted as an integer
         Assert.assertEquals("100 is enough", result);
     }
@@ -56,7 +60,8 @@ public class TestMessageFactory {
     @Test
     public void testFormatNoArguments() {
         String input = "1E+2";
-        String result = 
messageFactory.getInternal("messageFactory.formatNoArguments", new 
BigDecimal(input), 0 /*ignored*/);
+        String result =
+                messageFactory.getInternal("messageFactory.formatNoArguments", 
new BigDecimal(input), ZERO /*ignored*/);
         Assert.assertEquals("A message", result);
     }
 }


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

Reply via email to