Changeset 6466


Ignore:
Timestamp:
08/18/15 07:42:18 (9 years ago)
Author:
Twan Goosen
Message:

deal with null documents in document models (and prevent NPE in hierarchy display)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/model/SolrDocumentModel.java

    r6328 r6466  
    3939    public SolrDocumentModel(SolrDocument document) {
    4040        super(document);
    41         this.docId = Model.of((String) document.getFieldValue(FacetConstants.FIELD_ID));
     41        if (document == null) {
     42            this.docId = null;
     43        } else {
     44            this.docId = Model.of((String) document.getFieldValue(FacetConstants.FIELD_ID));
     45        }
    4246    }
    4347
Note: See TracChangeset for help on using the changeset viewer.