jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r378225 - /incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
Date Thu, 16 Feb 2006 11:11:34 GMT
Author: mreutegg
Date: Thu Feb 16 03:11:31 2006
New Revision: 378225

URL: http://svn.apache.org/viewcvs?rev=378225&view=rev
Log:
- use constant values for boolean InternalValue

Modified:
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java?rev=378225&r1=378224&r2=378225&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
Thu Feb 16 03:11:31 2006
@@ -69,6 +69,10 @@
 
     public static final InternalValue[] EMPTY_ARRAY = new InternalValue[0];
 
+    public static final InternalValue BOOLEAN_TRUE = create(true);
+
+    public static final InternalValue BOOLEAN_FALSE = create(false);
+
     private final Object val;
     private final int type;
 
@@ -107,7 +111,7 @@
                     throw new ValueFormatException(ioe.getMessage());
                 }
             case PropertyType.BOOLEAN:
-                return new InternalValue(value.getBoolean());
+                return value.getBoolean() ? BOOLEAN_TRUE : BOOLEAN_FALSE;
             case PropertyType.DATE:
                 return new InternalValue(value.getDate());
             case PropertyType.DOUBLE:



Mime
View raw message