/** * Parses the given date string. This method is synchronized to prevent * concurrent access to the thread-unsafe date formats. * * @see <a href="https://issues.apache.org/jira/browse/TIKA-495">TIKA-495</a> * @param date date string * @return parsed date, or <code>null</code> if the date can't be parsed */ private static synchronized Date parseDate(String date) { return DATE_UTILS.tryToParse(date); }
private void startEditedSection(EditType editType, Attributes atts) { String editAuthor = atts.getValue(W_NS, "author"); String editDateString = atts.getValue(W_NS, "date"); Date editDate = null; if (editDateString != null) { editDate = dateUtils.tryToParse(editDateString); } bodyContentsHandler.startEditedSection(editAuthor, editDate, editType); this.editType = editType; }
/** * Parses the given date string. This method is synchronized to prevent * concurrent access to the thread-unsafe date formats. * * @see <a href="https://issues.apache.org/jira/browse/TIKA-495">TIKA-495</a> * @param date date string * @return parsed date, or <code>null</code> if the date can't be parsed */ private static synchronized Date parseDate(String date) { return DATE_UTILS.tryToParse(date); }
/** * Parses the given date string. This method is synchronized to prevent * concurrent access to the thread-unsafe date formats. * * @see <a href="https://issues.apache.org/jira/browse/TIKA-495">TIKA-495</a> * @param date date string * @return parsed date, or <code>null</code> if the date can't be parsed */ private static synchronized Date parseDate(String date) { return DATE_UTILS.tryToParse(date); }
private void startEditedSection(EditType editType, Attributes atts) { String editAuthor = atts.getValue(W_NS, "author"); String editDateString = atts.getValue(W_NS, "date"); Date editDate = null; if (editDateString != null) { editDate = dateUtils.tryToParse(editDateString); } bodyContentsHandler.startEditedSection(editAuthor, editDate, editType); this.editType = editType; }
private void startEditedSection(EditType editType, Attributes atts) { String editAuthor = atts.getValue(W_NS, "author"); String editDateString = atts.getValue(W_NS, "date"); Date editDate = null; if (editDateString != null) { editDate = dateUtils.tryToParse(editDateString); } bodyContentsHandler.startEditedSection(editAuthor, editDate, editType); this.editType = editType; }