jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r915825 - in /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value: AbstractQValue.java QValueFactoryImpl.java QValueValue.java
Date Wed, 24 Feb 2010 15:35:04 GMT
Author: angela
Date: Wed Feb 24 15:35:03 2010
New Revision: 915825

URL: http://svn.apache.org/viewvc?rev=915825&view=rev
Log:
- add missing @Override annotation
- remove unnecessary unboxing in QValueValue

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueFactoryImpl.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java?rev=915825&r1=915824&r2=915825&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java
Wed Feb 24 15:35:03 2010
@@ -398,13 +398,13 @@
         // nothing to do
     }
 
-    //---------------------------------------------------------< Object >---
-
+    //-------------------------------------------------------------< Object >---
     /**
      * Returns the string representation of this internal value.
      *
      * @return string representation of this internal value
      */
+    @Override
     public String toString() {
         if (type == PropertyType.DATE) {
             return ISO8601.format((Calendar) val);
@@ -420,6 +420,7 @@
      * @param obj
      * @see Object#equals(Object)
      */
+    @Override
     public boolean equals(Object obj) {
         if (this == obj) {
             return true;
@@ -445,6 +446,7 @@
      * @return the hashCode of the internal value object.
      * @see Object#hashCode()
      */
+    @Override
     public int hashCode() {
         if (PropertyType.DATE == type) {
             return ISO8601.format((Calendar) val).hashCode();
@@ -452,4 +454,4 @@
             return val.hashCode();
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueFactoryImpl.java?rev=915825&r1=915824&r2=915825&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueFactoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueFactoryImpl.java
Wed Feb 24 15:35:03 2010
@@ -251,6 +251,7 @@
          *         or -1L if the length can't be determined.
          * @see QValue#getLength()
          */
+        @Override
         public long getLength() {
             if (file != null) {
                 // this instance is backed by a 'real' file
@@ -286,6 +287,7 @@
         /**
          * @see QValue#getName()
          */
+        @Override
         public Name getName() throws RepositoryException {
             throw new UnsupportedOperationException();
         }
@@ -293,6 +295,7 @@
         /**
          * @see QValue#getPath()
          */
+        @Override
         public Path getPath() throws RepositoryException {
             throw new UnsupportedOperationException();
         }
@@ -303,6 +306,7 @@
          * calling this method will have no effect.
          * @see QValue#discard()
          */
+        @Override
         public void discard() {
             if (!temp) {
                 // do nothing if this instance is not backed by temporarily
@@ -328,6 +332,7 @@
          *
          * @return A string representation of this <code>BinaryQValue</code>
instance.
          */
+        @Override
         public String toString() {
             if (file != null) {
                 // this instance is backed by a 'real' file
@@ -341,6 +346,7 @@
         /**
          * {@inheritDoc}
          */
+        @Override
         public boolean equals(Object obj) {
             if (this == obj) {
                 return true;
@@ -360,12 +366,12 @@
          * @return always zero
          * @see Object#hashCode()
          */
+        @Override
         public int hashCode() {
             return 0;
         }
 
-        //-----------------------------< Serializable >-------------------------
-
+        //---------------------------------------------------< Serializable >---
         private void writeObject(ObjectOutputStream out)
                 throws IOException {
             out.defaultWriteObject();
@@ -412,7 +418,5 @@
             // deserialized value is always temp
             temp = true;
         }
-
     }
-
 }

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java?rev=915825&r1=915824&r2=915825&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueValue.java
Wed Feb 24 15:35:03 2010
@@ -74,7 +74,7 @@
      */
     public boolean getBoolean() throws RepositoryException {
         if (getType() == PropertyType.STRING || getType() == PropertyType.BINARY || getType()
== PropertyType.BOOLEAN) {
-            return Boolean.valueOf(qvalue.getString()).booleanValue();
+            return Boolean.valueOf(qvalue.getString());
         } else {
             throw new ValueFormatException("incompatible type " + PropertyType.nameFromValue(qvalue.getType()));
         }
@@ -172,6 +172,7 @@
     /**
      * @see Object#equals(Object)
      */
+    @Override
     public boolean equals(Object obj) {
         if (obj instanceof QValueValue) {
             return qvalue.equals(((QValueValue) obj).qvalue);
@@ -183,6 +184,7 @@
     /**
      * @see Object#hashCode()
      */
+    @Override
     public int hashCode() {
         return qvalue.hashCode();
     }



Mime
View raw message