Commit d9abcab334653cc3458dee9660ef027c265611cf

Authored by Tiago Guimarães
1 parent 94cf7db9ad
Exists in DSpace52++

fixing dc.date.issue null pointer exception

dspace-api/src/main/java/pt/uminho/sdum/dspace/curationtasks/Tid.java
... ... @@ -18,7 +18,7 @@ public class Tid extends Distributor {
18 18 private static final int YMD = 1;
19 19 private static final int YM = 2;
20 20 private static final int Y = 3;
21   -
  21 + private static final DateValidator dv = new DateValidator("2013-08-07", "2013-07", "2012");
22 22 // Check if THESIS deposited after 2013 has TID
23 23 @Override
24 24 protected String processItem(Item item) throws SQLException {
... ... @@ -31,10 +31,9 @@ public class Tid extends Distributor {
31 31 String tid = item.getMetadata("dc.identifier.tid");
32 32 String sDate = item.getMetadata("dc.date.issued");
33 33  
34   - DateValidator dv = new DateValidator("2013-08-07", "2013-07", "2012");
35 34  
36 35 if (type != null && (type.equals("masterThesis") || type.equals("doctoralThesis"))) {
37   - if (dv.verifyAfter(sDate) && (tid == null || tid.isEmpty())) {
  36 + if (sDate != null && dv.verifyAfter(sDate) && (tid == null || tid.isEmpty())) {
38 37 if (item.isArchived() && !item.isWithdrawn()) {
39 38 res.append("<a href=\"http://hdl.handle.net/");
40 39 res.append(handle);
... ...