You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/21 02:47:09 UTC

[commons-text] 02/02: No need to initialize to default value.

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git

commit 764095f95c6cc8ae66fb1fb355eba3ccfc787620
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 21:47:02 2020 -0500

    No need to initialize to default value.
---
 src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java b/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
index 2a832b6..9d1dd8a 100644
--- a/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
+++ b/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
@@ -263,7 +263,7 @@ public class ExtendedMessageFormatTest {
     @Test
     public void testBuiltInChoiceFormat() {
         final Object[] values = new Number[] {1, Double.valueOf("2.2"), Double.valueOf("1234.5")};
-        String choicePattern = null;
+        String choicePattern;
         final Locale[] availableLocales = NumberFormat.getAvailableLocales();
 
         choicePattern = "{0,choice,1#One|2#Two|3#Many {0,number}}";
@@ -362,7 +362,7 @@ public class ExtendedMessageFormatTest {
         final String pattern = "Pattern: {0,testfmt}";
         final ExtendedMessageFormat emf = new ExtendedMessageFormat(pattern, Locale.US, fmtRegistry);
 
-        ExtendedMessageFormat other = null;
+        ExtendedMessageFormat other;
 
         // Same object
         assertTrue(emf.equals(emf), "same, equals()");