Skip to content

Commit 409733c

Browse files
committed
Merge some string literals
1 parent 012f3a9 commit 409733c

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ private static Type getClosestParentType(final Class<?> cls, final Class<?> supe
623623
} else if (midType instanceof Class<?>) {
624624
midClass = (Class<?>) midType;
625625
} else {
626-
throw new IllegalStateException("Unexpected generic" + " interface type found: " + midType);
626+
throw new IllegalStateException("Unexpected generic interface type found: " + midType);
627627
}
628628
// check if this interface is further up the inheritance chain
629629
// than the previously found match

src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void testEscapeJava() throws IOException {
234234
assertEscapeJava("Should use capitalized Unicode hex", "\\uABCD", "\uabcd");
235235

236236
assertEscapeJava("He didn't say, \\\"stop!\\\"", "He didn't say, \"stop!\"");
237-
assertEscapeJava("non-breaking space", "This space is non-breaking:" + "\\u00A0", "This space is non-breaking:\u00a0");
237+
assertEscapeJava("non-breaking space", "This space is non-breaking:\\u00A0", "This space is non-breaking:\u00a0");
238238
assertEscapeJava("\\uABCD\\u1234\\u012C", "\uABCD\u1234\u012C");
239239
}
240240

src/test/java/org/apache/commons/lang3/StringUtilsAbbreviateTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void testAbbreviateMiddle() {
176176
assertEquals("ab.f", StringUtils.abbreviateMiddle("abcdef", ".", 4));
177177
// JIRA issue (LANG-405) example (slightly different than actual expected result)
178178
assertEquals("A very long text with un...f the text is complete.", StringUtils.abbreviateMiddle(
179-
"A very long text with unimportant stuff in the middle but interesting start and " + "end to see if the text is complete.", "...", 50));
179+
"A very long text with unimportant stuff in the middle but interesting start and end to see if the text is complete.", "...", 50));
180180
// Test a much longer text :)
181181
final String longText = "Start text" + StringUtils.repeat("x", 10000) + "Close text";
182182
assertEquals("Start text->Close text", StringUtils.abbreviateMiddle(longText, "->", 22));

src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ public String toString() {
433433
object.pid = "dummy-text";
434434
object.map = baseMap;
435435

436-
assertEquals("{\"object\":{\"pid\":\"dummy-text\",\"map\":{\"k1\":\"v1\"," + "\"k2\":{\"k2.1\":\"v2.1\",\"k2.2\":\"v2.2\"}}}}",
436+
assertEquals("{\"object\":{\"pid\":\"dummy-text\",\"map\":{\"k1\":\"v1\",\"k2\":{\"k2.1\":\"v2.1\",\"k2.2\":\"v2.2\"}}}}",
437437
new ToStringBuilder(base).append("object", object).toString());
438438
}
439439

src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ void testReflectionArrayAndObjectCycle() {
790790
final Object[] objects = new Object[1];
791791
final SimpleReflectionTestFixture simple = new SimpleReflectionTestFixture(objects);
792792
objects[0] = simple;
793-
assertEquals(toBaseString(objects) + "[{" + toBaseString(simple) + "[o=" + toBaseString(objects) + "]" + "}]",
793+
assertEquals(toBaseString(objects) + "[{" + toBaseString(simple) + "[o=" + toBaseString(objects) + "]}]",
794794
ToStringBuilder.reflectionToString(objects));
795795
assertEquals(toBaseString(simple) + "[o={" + toBaseString(simple) + "}]", ToStringBuilder.reflectionToString(simple));
796796
}

src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ void test6() {
182182

183183
assertEquals(expected.length, tokens.length, ArrayUtils.toString(tokens));
184184

185-
assertEquals(nextCount, expected.length, "could not cycle through entire token list" + " using the 'hasNext' and 'next' methods");
185+
assertEquals(nextCount, expected.length, "could not cycle through entire token list using the 'hasNext' and 'next' methods");
186186

187-
assertEquals(prevCount, expected.length, "could not cycle through entire token list" + " using the 'hasPrevious' and 'previous' methods");
187+
assertEquals(prevCount, expected.length, "could not cycle through entire token list using the 'hasPrevious' and 'previous' methods");
188188

189189
}
190190

src/test/java/org/apache/commons/lang3/tuple/PairTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ void testToStringCustom() {
320320
final Calendar date = Calendar.getInstance();
321321
date.set(2011, Calendar.APRIL, 25);
322322
final Pair<String, Calendar> pair = Pair.of("DOB", date);
323-
assertEquals("Test created on " + "04-25-2011", pair.toString("Test created on %2$tm-%2$td-%2$tY"));
323+
assertEquals("Test created on 04-25-2011", pair.toString("Test created on %2$tm-%2$td-%2$tY"));
324324
}
325325

326326
}

src/test/java/org/apache/commons/lang3/tuple/TripleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void testToStringCustom() {
133133
final Calendar date = Calendar.getInstance();
134134
date.set(2011, Calendar.APRIL, 25);
135135
final Triple<String, String, Calendar> triple = Triple.of("DOB", "string", date);
136-
assertEquals("Test created on " + "04-25-2011", triple.toString("Test created on %3$tm-%3$td-%3$tY"));
136+
assertEquals("Test created on 04-25-2011", triple.toString("Test created on %3$tm-%3$td-%3$tY"));
137137
}
138138

139139
@Test

0 commit comments

Comments
 (0)