File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
java/org/apache/commons/lang
test/org/apache/commons/lang Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 7777 * @author Arun Mammen Thomas
7878 * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
7979 * @since 1.0
80- * @version $Id: StringUtils.java,v 1.47 2003/06/21 22:24:55 bayard Exp $
80+ * @version $Id: StringUtils.java,v 1.48 2003/06/23 03:51:13 bayard Exp $
8181 */
8282public class StringUtils {
8383
@@ -1048,7 +1048,7 @@ public static String chop(String str) {
10481048 */
10491049 public static String chopNewline (String str ) {
10501050 int lastIdx = str .length () - 1 ;
1051- if (lastIdx = = 0 ) {
1051+ if (lastIdx < = 0 ) {
10521052 return "" ;
10531053 }
10541054 char last = str .charAt (lastIdx );
Original file line number Diff line number Diff line change 6969 * @author <a href="mailto:fredrik@westermarck.com>Fredrik Westermarck</a>
7070 * @author Holger Krauth
7171 * @author <a href="hps@intermeta.de">Henning P. Schmiedehausen</a>
72- * @version $Id: StringUtilsTest.java,v 1.20 2003/06/21 22:24:56 bayard Exp $
72+ * @version $Id: StringUtilsTest.java,v 1.21 2003/06/23 03:51:13 bayard Exp $
7373 */
7474public class StringUtilsTest extends TestCase {
7575
@@ -343,6 +343,7 @@ public void testChopNewLine() {
343343 { FOO + "\n " + FOO , FOO + "\n " + FOO },
344344 { FOO + "\n \n " , FOO + "\n " },
345345 { "\n " , "" },
346+ { "" , "" },
346347 { "\r \n " , "" }
347348 };
348349
You can’t perform that action at this time.
0 commit comments