[
https://jira.jboss.org/jira/browse/JBCACHE-1518?page=com.atlassian.jira.p...
]
Galder Zamarreno commented on JBCACHE-1518:
-------------------------------------------
In fact, all of this return null to:
cache.put("/a/b/c", lotsOfData);
Node n = cache.getRoot();
assert null != n.getChild("/a/b/c"); // fails
assert null != n.getChild("a/b/c"); // fails
assert null != n.getChild("/a/b"); // fails
assert null != n.getChild("/a"); // fails
assert null != n.getChild("/a/b"); // fails
The only one not returning null are:
assert null != n.getChild("a"); // works
assert null != n.getChild("a").getChild("b"); // works
assert null != n.getChild("a").getChild("b").getChild("c");
// works
So, as per the Node.getChild(String), we're definitely now only returning direct
childs of nodes.
However, note that Fqn.fromString() is used, any of these is valid:
assert null != n.getChild(Fqn.fromString("a")); // works
assert null != n.getChild(Fqn.fromString("/a")); // works
assert null != n.getChild(Fqn.fromString("a/b")); // works
assert null != n.getChild(Fqn.fromString("/a/b")); // works
assert null != n.getChild(Fqn.fromString("a/b/c")); // works
assert null != n.getChild(Fqn.fromString("/a/b/c")); // works
So, I'm not 100% sure whether it's just a matter of correcting the documentation
and indicating the differences between the two getChild(), or whether both getChild()
methods should behave in exactly the same way.
getChild() returning null
-------------------------
Key: JBCACHE-1518
URL:
https://jira.jboss.org/jira/browse/JBCACHE-1518
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.1.0.GA
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Fix For: 3.2.0.GA
Running the following code from the user guide throws an NPE in line 3:
1. Map lotsOfData = generateData();
2. cache.put("/a/b/c", lotsOfData);
3. cache.getRoot().getChild("/a").setResident(true);
4. cache.getRoot().getChild("/a/b").setResident(true);
Needs further investigation...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira