Skip to content

Commit

Permalink
#5981 check for empty value array
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Jun 27, 2019
1 parent 2f477c9 commit c344b3b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,10 @@ private String addOrUpdateDataset(IndexableDataset indexableDataset, Set<Long> d
// no-op. we want to keep email address out of Solr per
// https://github.com/IQSS/dataverse/issues/759
} else if (dsfType.getSolrField().getSolrType().equals(SolrField.SolrType.DATE)) {
String dateAsString = dsf.getValues_nondisplay().get(0);
String dateAsString = "";
if (!dsf.getValues_nondisplay().isEmpty()) {
dateAsString = dsf.getValues_nondisplay().get(0);
}
logger.fine("date as string: " + dateAsString);
if (dateAsString != null && !dateAsString.isEmpty()) {
SimpleDateFormat inputDateyyyy = new SimpleDateFormat("yyyy", Locale.ENGLISH);
Expand Down

0 comments on commit c344b3b

Please sign in to comment.