Changeset 32319 for main/trunk

Show
Ignore:
Timestamp:
31.07.2018 10:01:09 (15 months ago)
Author:
kjdon
Message:

Georgy was having issues with setNodeText - the child node to be removed was not there causing null pointer exception. concurrent access issue? Now we copy the node before setting the text - don't want to be modifying the underlying list as two thread may be trying to modify it at the same time.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DisplayItemUtil.java

    r32082 r32319  
    8888        String value = getTextString(new_m.getAttribute(GSXML.KEY_ATT), lang, new_m.getAttribute(GSXML.DICTIONARY_ATT), class_loader); 
    8989        if (value != null) { 
     90          // copy the node now. Don't want to be modifying the underlying list as can lead to concurrent access problems. 
     91          new_m = (Element)doc.importNode(new_m, true); 
    9092          GSXML.setNodeText(new_m, value); 
    9193        }