mirror of https://github.com/apache/lucene.git
Instance check for java.util.Date instead of java.sql.Date
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@826732 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0afb986b1e
commit
1b574bb5b8
|
@ -16,11 +16,7 @@
|
|||
*/
|
||||
package org.apache.solr.handler.dataimport;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
@ -98,8 +94,8 @@ public class TemplateString {
|
|||
}
|
||||
|
||||
private String getObjectAsString(Object val) {
|
||||
if (val instanceof java.sql.Date) {
|
||||
java.sql.Date d = (java.sql.Date) val;
|
||||
if (val instanceof Date) {
|
||||
Date d = (Date) val;
|
||||
return DataImporter.DATE_TIME_FORMAT.get().format(d);
|
||||
}
|
||||
return val.toString();
|
||||
|
|
Loading…
Reference in New Issue