Don't mutate parameters

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1567801 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2014-02-12 23:27:47 +00:00
parent 9135f2d28c
commit 408462e80d
1 changed files with 2 additions and 2 deletions

View File

@ -441,11 +441,11 @@ public class FastDateParser implements DateParser, Serializable {
* @param definingCalendar The calendar to obtain the short and long values * @param definingCalendar The calendar to obtain the short and long values
* @return The Strategy that will handle parsing for the field * @return The Strategy that will handle parsing for the field
*/ */
private Strategy getStrategy(String formatField, final Calendar definingCalendar) { private Strategy getStrategy(final String formatField, final Calendar definingCalendar) {
switch(formatField.charAt(0)) { switch(formatField.charAt(0)) {
case '\'': case '\'':
if(formatField.length()>2) { if(formatField.length()>2) {
formatField= formatField.substring(1, formatField.length()-1); return new CopyQuotedStrategy(formatField.substring(1, formatField.length()-1));
} }
//$FALL-THROUGH$ //$FALL-THROUGH$
default: default: