Changeset 32319


Ignore:
Timestamp:
07/31/18 10:01:09 (2 years 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.

File:
1 edited

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        }
Note: See TracChangeset for help on using the changeset viewer.