[jboss-cvs] JBossCache/src/org/jboss/cache ...

Manik Surtani msurtani at jboss.com
Wed Oct 11 06:02:07 EDT 2006


  User: msurtani
  Date: 06/10/11 06:02:07

  Modified:    src/org/jboss/cache  Fqn.java
  Log:
  * Removed ExtendedCacheLoader base test
  * Merged store and load tests into CacheLoaderTestBase
  * Fixed bug in Fqn.getFqnChild(), added better javadocs and unit tests
  
  Revision  Changes    Path
  1.39      +16 -7     JBossCache/src/org/jboss/cache/Fqn.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Fqn.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Fqn.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -b -r1.38 -r1.39
  --- Fqn.java	9 Oct 2006 08:02:59 -0000	1.38
  +++ Fqn.java	11 Oct 2006 10:02:07 -0000	1.39
  @@ -41,7 +41,7 @@
    * <p/>
    * Another way to look at it is that the "/" separarator is only parsed when it form sa  part of a String passed in to Fqn.fromString() and not otherwise.
    *
  - * @version $Revision: 1.38 $
  + * @version $Revision: 1.39 $
    */
   public class Fqn implements Cloneable, Externalizable
   {
  @@ -244,18 +244,27 @@
      }
   
      /**
  -    * Obtains a child Fqn from a sub-index.
  -    *
  -    * @param index where is the last index of child fqn
  -    * @return A Fqn child object.
  +    * Obtains a sub-Fqn from the given Fqn.  Literally performs <code>elements.subList(0, index)</code>
  +    * such that if
  +    * <code>
  +    * index == fqn.size()
  +    * </code>
  +    * then the return value is the fqn itself, and if
  +    * <code>
  +    * index == fqn.size() - 1
  +    * </code>
  +    * then the return value is the same as
  +    * <code>
  +    * fqn.getParent()
  +    * </code>
       */
      public Fqn getFqnChild(int index)
      {
  -      return createFqn(elements.subList(0, index+1));
  +      return getFqnChild(0, index);
      }
   
      /**
  -    * Obtains a child Fqn from a sub-index.
  +    * Obtains a sub-Fqn from the given Fqn.  Literally performs <code>elements.subList(startIndex, endIndex)</code>
       */
      public Fqn getFqnChild(int startIndex, int endIndex)
      {
  
  
  



More information about the jboss-cvs-commits mailing list