Changeset 14743


Ignore:
Timestamp:
2007-10-30T15:08:05+13:00 (15 years ago)
Author:
anna
Message:

Fixed the bug when moving up the last element of subcollection partitions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/cdm/SubcollectionIndex.java

    r12798 r14743  
    5050
    5151    /** Constructor. */
    52     public SubcollectionIndex(Element element) {
     52    public SubcollectionIndex(Element element) { 
    5353    this.element = element;
    5454    }
     
    8080    }
    8181   
    82     public DOMProxyListEntry create(Element element) {
     82    public DOMProxyListEntry create(Element element) {         
    8383    return new SubcollectionIndex(element);
    8484    }
     
    118118    if(sources == null) {
    119119        sources = new ArrayList();
    120         NodeList content_elements = element.getElementsByTagName(StaticStrings.CONTENT_ELEMENT);
     120        // for the last entry in the assigned subcollection partitions, element is null
     121        // why this is null for the last entry?
     122        if(element==null){   
     123          return sources;
     124        }
     125        NodeList content_elements = element.getElementsByTagName(StaticStrings.CONTENT_ELEMENT);       
    121126        int content_elements_length = content_elements.getLength();
    122127        for(int i = 0; i < content_elements_length; i++) {
Note: See TracChangeset for help on using the changeset viewer.