public static Date parseDate(String str, String parsePatterns[]) throws ParseException {
/* 253*/ if (str == null || parsePatterns == null) {
/* 254*/ throw new IllegalArgumentException("Date and Patterns must not be null");
}
/* 257*/ SimpleDateFormat parser = null;
/* 258*/ ParsePosition pos = new ParsePosition(0);
/* 259*/ for (int i = 0; i < parsePatterns.length; i++) {
/* 260*/ if (i == 0) {
/* 261*/ parser = new SimpleDateFormat(parsePatterns[0]);
} else {
/* 263*/ parser.applyPattern(parsePatterns[i]);
}
/* 265*/ pos.setIndex(0);
/* 266*/ Date date = parser.parse(str, pos);
/* 267*/ if (date != null && pos.getIndex() == str.length()) {
/* 268*/ return date;
}
}
/* 271*/ throw new ParseException("Unable to parse the date: " + str, -1);
}


















































































































































