stefan      2004/07/02 09:25:02

  Modified:    proposals/jcrri/src/org/apache/slide/jcr/core
                        BLOBFileValue.java InternalValue.java ItemImpl.java
                        Path.java
  Log:
  jcrri
  
  Revision  Changes    Path
  1.4       +16 -2     
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/BLOBFileValue.java
  
  Index: BLOBFileValue.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/BLOBFileValue.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BLOBFileValue.java        22 Jun 2004 18:03:24 -0000      1.3
  +++ BLOBFileValue.java        2 Jul 2004 16:25:02 -0000       1.4
  @@ -132,6 +132,20 @@
        tmpFile = false;
       }
   
  +    public boolean equals(Object obj) {
  +     if (this == obj) {
  +         return true;
  +     }
  +     if (obj instanceof BLOBFileValue) {
  +         BLOBFileValue other = (BLOBFileValue) obj;
  +         return (file == other.file ||
  +                 (file != null && file.equals(other.file))) &&
  +                 (fsResource == other.fsResource ||
  +                 (fsResource != null && fsResource.equals(other.fsResource)));
  +     }
  +     return false;
  +    }
  +
       /**
        * Returns the length of this <code>BLOBFileValue</code>.
        *
  
  
  
  1.4       +13 -2     
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/InternalValue.java
  
  Index: InternalValue.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/InternalValue.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InternalValue.java        22 Jun 2004 18:03:24 -0000      1.3
  +++ InternalValue.java        2 Jul 2004 16:25:02 -0000       1.4
  @@ -311,6 +311,17 @@
        }
       }
   
  +    public boolean equals(Object obj) {
  +     if (this == obj) {
  +         return true;
  +     }
  +     if (obj instanceof InternalValue) {
  +         InternalValue other = (InternalValue) obj;
  +         return val.equals(other.val);
  +     }
  +     return false;
  +    }
  +
       /**
        *
        * @param s
  
  
  
  1.9       +3 -3      
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/ItemImpl.java
  
  Index: ItemImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/ItemImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ItemImpl.java     1 Jul 2004 18:29:41 -0000       1.8
  +++ ItemImpl.java     2 Jul 2004 16:25:02 -0000       1.9
  @@ -625,7 +625,7 @@
        ItemState transientState;
   
        // list of events that are generated by saved changes
  -     EventStateCollection events = new EventStateCollection(ticket.getUserId());
  +     EventStateCollection events = new EventStateCollection(ticket);
   
        // check status of this item's state
        if (isTransient()) {
  
  
  
  1.4       +5 -11     
jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/jcrri/src/org/apache/slide/jcr/core/Path.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Path.java 22 Jun 2004 18:03:07 -0000      1.3
  +++ Path.java 2 Jul 2004 16:25:02 -0000       1.4
  @@ -29,6 +29,7 @@
   import javax.jcr.NamespaceException;
   import java.util.ArrayList;
   import java.util.LinkedList;
  +import java.util.Arrays;
   import java.util.regex.Matcher;
   import java.util.regex.Pattern;
   
  @@ -375,7 +376,7 @@
        * @see #toString()
        */
       public static Path valueOf(String s) {
  -     if ((s == null) || s.equals("")) {
  +     if ("".equals(s) || s == null) {
            throw new IllegalArgumentException("invalid Path literal");
        }
   
  @@ -420,14 +421,7 @@
        }
        if (obj instanceof Path) {
            Path other = (Path) obj;
  -         if (elements.length == other.elements.length) {
  -             for (int i = 0; i < elements.length; i++) {
  -                 if (!elements[i].equals(other.elements[i])) {
  -                     return false;
  -                 }
  -             }
  -             return true;
  -         }
  +         return Arrays.equals(elements, other.elements);
        }
        return false;
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to