Revision 46866
Added by Alessia Bardi about 7 years ago
modules/dnet-data-services/branches/saxonHE/src/main/java/eu/dnetlib/data/mdstore/modular/mongodb/MongoMDStore.java | ||
---|---|---|
162 | 162 |
return null; |
163 | 163 |
} |
164 | 164 |
try { |
165 |
return Long.valueOf(s); |
|
165 |
Long l = Long.valueOf(s); |
|
166 |
if(l.longValue() == 0 || l.longValue() == -1 ) return null; |
|
167 |
else return l; |
|
166 | 168 |
} catch (NumberFormatException e) { |
167 | 169 |
throw new MDStoreServiceException("Invalid date, expected java.lang.Long, or null", e); |
168 | 170 |
} |
Also available in: Unified diff
Also handle -1 date