Changeset 29175

Show
Ignore:
Timestamp:
07.08.2014 14:51:04 (5 years ago)
Author:
ak19
Message:

Fixing off by one error of boolean operators in the GS3 search form interface. Kathy had located the problem in XSLUtil.getNumberedItem(). Fixed it by using String.split instead of StringUtils?.split, since the latter skipped empty tokens.

Files:
1 modified

Legend:

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

    r26557 r29175  
    150150    public static String getNumberedItem(String list, int number) 
    151151    { 
    152         String[] items = StringUtils.split(list, ",", -1); 
     152        String[] items = list.split(",", -1); //String[] items = StringUtils.split(list, ",", -1);  
     153        // Using StringUtils.split() causes an off-by-one error for the boolean operators (fqk) 
     154        // where boolean operators combining rows in multiforms are shifted up by 1 row. 
     155 
    153156        if (items.length > number) 
    154157        {