in maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java [302:346]
public void setDate(String date, String userDatePattern) {
try {
if (!(userDatePattern == null || userDatePattern.isEmpty())) {
SimpleDateFormat format = new SimpleDateFormat(userDatePattern);
this.date = format.parse(date);
} else {
this.date = TIMESTAMP_FORMAT_3.parse(date);
}
} catch (ParseException e) {
if (!(userDatePattern == null || userDatePattern.isEmpty())) {
try {
this.date = TIMESTAMP_FORMAT_3.parse(date);
} catch (ParseException pe) {
try {
this.date = TIMESTAMP_FORMAT_4.parse(date);
} catch (ParseException pe1) {
try {
this.date = TIMESTAMP_FORMAT_1.parse(date);
} catch (ParseException pe2) {
try {
this.date = TIMESTAMP_FORMAT_2.parse(date);
} catch (ParseException pe3) {
throw new IllegalArgumentException("Unable to parse date: " + date);
}
}
}
}
} else {
try {
this.date = TIMESTAMP_FORMAT_4.parse(date);
} catch (ParseException pe1) {
try {
this.date = TIMESTAMP_FORMAT_1.parse(date);
} catch (ParseException pe2) {
try {
this.date = TIMESTAMP_FORMAT_2.parse(date);
} catch (ParseException pe3) {
throw new IllegalArgumentException("Unable to parse date: " + date);
}
}
}
}
}
}