Skip to content

Commit aa5021b

Browse files
committed
Reuse constant
1 parent 756f0d3 commit aa5021b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/test/java/org/apache/commons/codec/StringEncoderComparatorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import org.apache.commons.codec.language.DoubleMetaphone;
2424
import org.apache.commons.codec.language.Soundex;
25+
import org.apache.commons.lang3.ArrayUtils;
2526
import org.junit.jupiter.api.Test;
2627

2728
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -52,7 +53,7 @@ public void testComparatorWithDoubleMetaphone() throws Exception {
5253

5354
testList.sort(sCompare); // unchecked
5455

55-
final String[] resultArray = testList.toArray(new String[0]);
56+
final String[] resultArray = testList.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
5657

5758
for (int i = 0; i < resultArray.length; i++) {
5859
assertEquals(controlArray[i], resultArray[i],

0 commit comments

Comments
 (0)