Fixed random IndexOutofBound exception.

This commit is contained in:
Heng Sin Low 2010-10-26 19:06:06 +08:00
parent 2c4cb3b712
commit 836c789066
1 changed files with 21 additions and 21 deletions

View File

@ -1096,7 +1096,7 @@ public class CConnection implements Serializable, Cloneable
{
String[] pairComponents = pair.split("[=]");
String key = pairComponents[0];
String value = unescape(pairComponents[1]);
String value = pairComponents.length == 2 ? unescape(pairComponents[1]) : "";
if ("name".equalsIgnoreCase(key))
{
setName(value);
@ -1157,7 +1157,7 @@ public class CConnection implements Serializable, Cloneable
}
catch (Exception e)
{
log.severe(attributes + " - " + e.toString ());
log.log(Level.SEVERE, attributes + " - " + e.toString (), e);
}
} // setAttributes