added emergency fix to display a "login or create" dialog for all AccessErrors
thrown by the engine when trying to view a conference/topic/post and the user is not logged in
This commit is contained in:
@@ -278,5 +278,48 @@ public class StringUtil
|
||||
|
||||
} // end join
|
||||
|
||||
} // end class StringUtil
|
||||
public static final List splitList(String data, String delims)
|
||||
{
|
||||
if ((data==null) || (delims==null))
|
||||
return Collections.EMPTY_LIST;
|
||||
ArrayList rc = new ArrayList();
|
||||
StringBuffer buf = new StringBuffer();
|
||||
boolean accumulate = false;
|
||||
for (int i=0; i<data.length(); i++)
|
||||
{ // look at each character in turn
|
||||
char ch = data.charAt(i);
|
||||
if (delims.indexOf(ch)>=0)
|
||||
{ // delimiter character - flush the string if we have one
|
||||
if (accumulate)
|
||||
{ // flush the buffer
|
||||
rc.add(buf.toString());
|
||||
buf.setLength(0);
|
||||
accumulate = false;
|
||||
|
||||
} // end if
|
||||
|
||||
} // end if
|
||||
else
|
||||
{ // ordinary character - accumulate it
|
||||
accumulate = true;
|
||||
buf.append(ch);
|
||||
|
||||
} // end else
|
||||
|
||||
} // end for
|
||||
|
||||
if (rc.isEmpty())
|
||||
return Collections.EMPTY_LIST;
|
||||
else
|
||||
return Collections.unmodifiableList(rc);
|
||||
|
||||
} // end splitList
|
||||
|
||||
public static final String[] splitArray(String data, String delims)
|
||||
{
|
||||
List tmp = splitList(data,delims);
|
||||
return (String[])(tmp.toArray(new String[0]));
|
||||
|
||||
} // end splitArray
|
||||
|
||||
} // end class StringUtil
|
||||
|
||||
Reference in New Issue
Block a user