commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1381829 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
Date Fri, 07 Sep 2012 00:46:59 GMT
Author: sebb
Date: Fri Sep  7 00:46:59 2012
New Revision: 1381829

URL: http://svn.apache.org/viewvc?rev=1381829&view=rev
Log:
Unnecessary casts

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java?rev=1381829&r1=1381828&r2=1381829&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
Fri Sep  7 00:46:59 2012
@@ -484,8 +484,8 @@ public class StringUtilsEqualsIndexOfTes
     }
 
     public void testCustomCharSequence() {
-        assertThat((CharSequence) new CustomCharSequence(FOO), IsNot.<CharSequence>not(FOO));
-        assertThat((CharSequence) FOO, IsNot.<CharSequence>not(new CustomCharSequence(FOO)));
+        assertThat(new CustomCharSequence(FOO), IsNot.<CharSequence>not(FOO));
+        assertThat(FOO, IsNot.<CharSequence>not(new CustomCharSequence(FOO)));
         assertEquals(new CustomCharSequence(FOO), new CustomCharSequence(FOO));
     }
 
@@ -493,11 +493,11 @@ public class StringUtilsEqualsIndexOfTes
         final CharSequence fooCs = FOO, barCs = BAR, foobarCs = FOOBAR;
         assertTrue(StringUtils.equals(null, null));
         assertTrue(StringUtils.equals(fooCs, fooCs));
-        assertTrue(StringUtils.equals(fooCs, (CharSequence) new StringBuilder(FOO)));
-        assertTrue(StringUtils.equals(fooCs, (CharSequence) new String(new char[] { 'f',
'o', 'o' })));
-        assertTrue(StringUtils.equals(fooCs, (CharSequence) new CustomCharSequence(FOO)));
-        assertTrue(StringUtils.equals((CharSequence) new CustomCharSequence(FOO), fooCs));
-        assertFalse(StringUtils.equals(fooCs, (CharSequence) new String(new char[] { 'f',
'O', 'O' })));
+        assertTrue(StringUtils.equals(fooCs, new StringBuilder(FOO)));
+        assertTrue(StringUtils.equals(fooCs, new String(new char[] { 'f', 'o', 'o' })));
+        assertTrue(StringUtils.equals(fooCs, new CustomCharSequence(FOO)));
+        assertTrue(StringUtils.equals(new CustomCharSequence(FOO), fooCs));
+        assertFalse(StringUtils.equals(fooCs, new String(new char[] { 'f', 'O', 'O' })));
         assertFalse(StringUtils.equals(fooCs, barCs));
         assertFalse(StringUtils.equals(fooCs, null));
         assertFalse(StringUtils.equals(null, fooCs));



Mime
View raw message