diff --git a/src/java/org/apache/commons/lang/text/StrBuilder.java b/src/java/org/apache/commons/lang/text/StrBuilder.java index 6aaece999..8a70fd7a1 100644 --- a/src/java/org/apache/commons/lang/text/StrBuilder.java +++ b/src/java/org/apache/commons/lang/text/StrBuilder.java @@ -1128,7 +1128,7 @@ public class StrBuilder implements CharSequence, Appendable { * @since 3.0 */ public StrBuilder appendSeparator(String standard, String defaultIfEmpty) { - String str = isEmpty() ? defaultIfEmpty : standard; + String str = isEmpty() ? defaultIfEmpty : standard; if (str != null) { append(str); } @@ -1177,7 +1177,7 @@ public class StrBuilder implements CharSequence, Appendable { append(standard); } else { - append(defaultIfEmpty); + append(defaultIfEmpty); } return this; } diff --git a/src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java b/src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java index 6a513cc41..cf2c6af40 100644 --- a/src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java +++ b/src/test/org/apache/commons/lang/text/StrBuilderAppendInsertTest.java @@ -996,14 +996,14 @@ public class StrBuilderAppendInsertTest extends TestCase { //----------------------------------------------------------------------- public void testAppendSeparator_String_String() { - StrBuilder sb = new StrBuilder(); - final String startSeparator = "order by "; - final String standardSeparator = ","; - final String foo = "foo"; - sb.appendSeparator(null, null); - assertEquals("", sb.toString()); - sb.appendSeparator(standardSeparator, null); - assertEquals("", sb.toString()); + StrBuilder sb = new StrBuilder(); + final String startSeparator = "order by "; + final String standardSeparator = ","; + final String foo = "foo"; + sb.appendSeparator(null, null); + assertEquals("", sb.toString()); + sb.appendSeparator(standardSeparator, null); + assertEquals("", sb.toString()); sb.appendSeparator(standardSeparator, startSeparator); assertEquals(startSeparator, sb.toString()); sb.appendSeparator(null, null); @@ -1027,10 +1027,10 @@ public class StrBuilderAppendInsertTest extends TestCase { assertEquals("foo,", sb.toString()); } public void testAppendSeparator_char_char() { - StrBuilder sb = new StrBuilder(); - final char startSeparator = ':'; - final char standardSeparator = ','; - final String foo = "foo"; + StrBuilder sb = new StrBuilder(); + final char startSeparator = ':'; + final char standardSeparator = ','; + final String foo = "foo"; sb.appendSeparator(standardSeparator, startSeparator); // no effect assertEquals(String.valueOf(startSeparator), sb.toString()); sb.append(foo); diff --git a/src/test/org/apache/commons/lang/time/DateUtilsTest.java b/src/test/org/apache/commons/lang/time/DateUtilsTest.java index 73dd81ff2..77aa10276 100644 --- a/src/test/org/apache/commons/lang/time/DateUtilsTest.java +++ b/src/test/org/apache/commons/lang/time/DateUtilsTest.java @@ -1161,8 +1161,8 @@ public class DateUtilsTest extends TestCase { * Tests various values with the ceiling method */ public void testCeil() throws Exception { - // tests public static Date ceiling(Date date, int field) - assertEquals("ceiling year-1 failed", + // tests public static Date ceiling(Date date, int field) + assertEquals("ceiling year-1 failed", dateParser.parse("January 1, 2003"), DateUtils.ceiling(date1, Calendar.YEAR)); assertEquals("ceiling year-2 failed", @@ -1317,7 +1317,7 @@ public class DateUtilsTest extends TestCase { // Fix for http://issues.apache.org/bugzilla/show_bug.cgi?id=25560 // Test ceiling across the beginning of daylight saving time - TimeZone.setDefault(zone); + TimeZone.setDefault(zone); dateTimeParser.setTimeZone(zone); assertEquals("ceiling MET date across DST change-over", @@ -1373,7 +1373,7 @@ public class DateUtilsTest extends TestCase { } else { this.warn("WARNING: Some date ceiling tests not run since the current version is " + SystemUtils.JAVA_VERSION); } - TimeZone.setDefault(defaultZone); + TimeZone.setDefault(defaultZone); dateTimeParser.setTimeZone(defaultZone); // Bug 31395, large dates