DateField already formats the date as a string before sending it to the writer
------------------------------------------------------------------------------

                 Key: SOLR-759
                 URL: https://issues.apache.org/jira/browse/SOLR-759
             Project: Solr
          Issue Type: Bug
    Affects Versions: 1.3
            Reporter: Stephane Bailliez
            Priority: Minor



  public void write(XMLWriter xmlWriter, String name, Fieldable f) throws 
IOException {
    xmlWriter.writeDate(name, toExternal(f));
  }

  public void write(TextResponseWriter writer, String name, Fieldable f) throws 
IOException {
    writer.writeDate(name, toExternal(f));
  }

The above calls the method on the writer that takes a string as a value. For 
makes the formatting logic in the response writer irrelevant and is inefficient 
in case you need to format the date differently in a custom writer (you need to 
parse again the date into a date object that format it again)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to