Removing the unnecessary sequenceToString method

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1082817 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2011-03-18 03:42:17 +00:00
parent adea6bf13a
commit e11cafae80
1 changed files with 2 additions and 11 deletions

View File

@ -2002,7 +2002,7 @@ public static String substring(CharSequence str, int start) {
return EMPTY;
}
return sequenceToString(str.subSequence(start, str.length()));
return str.subSequence(start, str.length()).toString();
}
/**
@ -2070,7 +2070,7 @@ public static String substring(CharSequence str, int start, int end) {
end = 0;
}
return sequenceToString(str.subSequence(start, end));
return str.subSequence(start, end).toString();
}
// Left/Right/Mid
@ -6495,13 +6495,4 @@ static char[] toCharArraySequence(CharSequence cs) {
}
}
// Convert a CharSequence to a String
static String sequenceToString(CharSequence cs) {
if (cs instanceof String) {
return ((String) cs);
} else {
return cs.toString();
}
}
}