# HG changeset patch # User shoshi # Date 1297851914 -32400 # Node ID d830fb5aeecec35b9cff061b009c785fe3afcb4e # Parent 7a558c7d4f41ef9fd62d115fc2583cc0cae7170a bugfix byte[0] = {0} and stringtokenizer diff -r 7a558c7d4f41 -r d830fb5aeece src/treecms/proto/cassandra/v1/CassBrowser.java --- a/src/treecms/proto/cassandra/v1/CassBrowser.java Wed Feb 16 18:43:58 2011 +0900 +++ b/src/treecms/proto/cassandra/v1/CassBrowser.java Wed Feb 16 19:25:14 2011 +0900 @@ -409,21 +409,29 @@ public String getClassName(NodeID _id) { - return new String(getColumn(_id.toString(),CLASSNAME)); + byte[] res = getColumn(_id.toString(),CLASSNAME); + if(res == null){ + return ""; + } + return new String(res); } public String getChildrenRaw(NodeID _id) { - String res = new String(getColumn(_id.toString(),CHILDREN)); + byte[] res = getColumn(_id.toString(),CHILDREN); if(res == null){ return ""; } - return res; + return new String(res); } public String getTitle(NodeID _id) { - return new String(getColumn(_id.toString(),TITLE)); + byte[] res = getColumn(_id.toString(),TITLE); + if(res == null){ + return ""; + } + return new String(res); } public void setTitle(NodeID _id,String _title) @@ -495,7 +503,7 @@ path.column_family = m_colFamily; path.column = _colName.getBytes(); - byte[] value = {0}; + byte[] value = null; try{ ColumnOrSuperColumn column; column = m_cassandra.get(m_keySpace,_row,path,ConsistencyLevel.ALL);