[jbosscache-commits] JBoss Cache SVN: r7978 - core/trunk/src/main/java/org/jboss/cache/commands/read.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Mon Apr 6 13:30:25 EDT 2009


Author: manik.surtani at jboss.com
Date: 2009-04-06 13:30:25 -0400 (Mon, 06 Apr 2009)
New Revision: 7978

Modified:
   core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java
Log:
Added null check

Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java	2009-04-06 14:47:49 UTC (rev 7977)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java	2009-04-06 17:30:25 UTC (rev 7978)
@@ -81,6 +81,7 @@
     * @param ctx      invocation context
     * @return a set of valid children names.
     */
+   @SuppressWarnings("unchecked")
    private Set<Object> getCorrectedChildNames(Collection<InternalNode> children, InvocationContext ctx)
    {
       Set<Object> childNames = new HashSet<Object>();
@@ -103,7 +104,7 @@
          if (childFqn.isDirectChildOf(fqn))
          {
             ReadCommittedNode childNode = (ReadCommittedNode) n.getValue();
-            if (childNode.isCreated()) childNames.add(childFqn.getLastElement());
+            if (childNode != null && childNode.isCreated()) childNames.add(childFqn.getLastElement());
          }
       }
       return childNames;




More information about the jbosscache-commits mailing list