You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/09/09 18:03:57 UTC
[tomcat] branch 8.5.x updated: Silence IDE warnings
This is an automated email from the ASF dual-hosted git repository.
markt 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 87c3af3d5e Silence IDE warnings
87c3af3d5e is described below
commit 87c3af3d5ec87b0c56005e650da07af0b7660545
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org