web/src/main/java/org/springframework/security/web/savedrequest/FastHttpDateFormat.java
public static long parseDate(String value, DateFormat[] threadLocalformats) {
		Long cachedDate = null;

		try {
			cachedDate = (Long) parseCache.get(value);
		}
		catch (Exception ignored) {
		}

		if (cachedDate != null) {
			return cachedDate.longValue();
		}

		Long date;

		if (threadLocalformats != null) {
			date = internalParseDate(value, threadLocalformats);

			synchronized (parseCache) {
				updateCache(parseCache, value, date);
			}
		}
		else {
			synchronized (parseCache) {
				date = internalParseDate(value, formats);
				updateCache(parseCache, value, date);
			}
		}

		if (date == null) {
			return (-1L);
		}
		else {
			return date.longValue();
		}
	}
public static long parseDate(String value, DateFormat[] threadLocalformats) {
		Long cachedDate = null;

		try {
			cachedDate = (Long) parseCache.get(value);
		}
		catch (Exception ignored) {
		}

		if (cachedDate != null) {
			return cachedDate.longValue();
		}

		Long date;

		if (threadLocalformats != null) {
			date = internalParseDate(value, threadLocalformats);

			synchronized (parseCache) {
				updateCache(parseCache, value, date);
			}
		}
		else {
			synchronized (parseCache) {
				date = internalParseDate(value, formats);
				updateCache(parseCache, value, date);
			}
		}

		if (date == null) {
			return (-1L);
		}
		else {
			return date.longValue();
		}
	}
Tries to parse the given date as an HTTP date. If local format list is not
<code>null</code>, it's used instead.

@param value The string to parse
@param threadLocalformats Array of formats to use for parsing. If <code>null</code>
, HTTP formats are used.

@return Parsed date (or -1 if error occurred)