if (str.length() <= 0)
return super.unalias(str);
// snag this case early as it only causes problems
if (str.equals(","))
throw new ParseException(s_loc.get("invalid-list-config",
getProperty(), str, getAliasList()));
// unalias the list and concatenate the list of
// canonical values. Also, catch any bad aliases.
boolean found;
String iString;
StringBuffer retv = new StringBuffer();
String[] vals = str.split(",", 0);
for (int i = 0; i < vals.length; i++) {
iString = vals[i] = vals[i].trim();
found = false;
if (i > 0)
retv.append(',');
for (int x = 0; x < aliases.length; x += 2)
if (StringUtils.equals(iString, aliases[x])
|| StringUtils.equals(iString, aliases[x + 1])) {
retv.append(aliases[x + 1]);
found = true;
break;
}
// If the alias list is not comprehensive, add any unknown
// values back onto the list
if (!found) {
if (isAliasListComprehensive())
throw new ParseException(s_loc.get("invalid-list-config",
getProperty(), str, getAliasList()));
else
retv.append(iString);
}
}