Unnecessary casts

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1381829 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-09-07 00:46:59 +00:00
parent c05a57eef2
commit da0e6d77f8
1 changed files with 7 additions and 7 deletions

View File

@ -484,8 +484,8 @@ public class StringUtilsEqualsIndexOfTest extends TestCase {
}
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 StringUtilsEqualsIndexOfTest extends TestCase {
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));