Author: manik.surtani(a)jboss.com
Date: 2008-04-23 09:48:34 -0400 (Wed, 23 Apr 2008)
New Revision: 5647
Modified:
core/trunk/src/main/java/org/jboss/cache/StringFqn.java
Log:
More accurate construction
Modified: core/trunk/src/main/java/org/jboss/cache/StringFqn.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/StringFqn.java 2008-04-23 13:48:19 UTC (rev
5646)
+++ core/trunk/src/main/java/org/jboss/cache/StringFqn.java 2008-04-23 13:48:34 UTC (rev
5647)
@@ -36,7 +36,20 @@
protected StringFqn(StringFqn base, StringFqn relative)
{
super(true, base, relative.elements);
- stringRepresentation = base.isRoot() ? relative.stringRepresentation :
base.stringRepresentation + relative.stringRepresentation;
+ if (base.isRoot())
+ {
+ if (relative.isRoot())
+ stringRepresentation = SEPARATOR;
+ else
+ stringRepresentation = relative.stringRepresentation;
+ }
+ else
+ {
+ if (relative.isRoot())
+ stringRepresentation = base.stringRepresentation;
+ else
+ stringRepresentation = base.stringRepresentation +
relative.stringRepresentation;
+ }
}
protected StringFqn(List<String> stringElements)
Show replies by date