incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1465904 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrResourceUtil.java
Date Tue, 09 Apr 2013 06:36:41 GMT
Author: cziegeler
Date: Tue Apr  9 06:36:41 2013
New Revision: 1465904

URL: http://svn.apache.org/r1465904
Log:
SLING-2817 :  JcrResourceUtil#createValue should treat integer and short as long and not as
double 

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrResourceUtil.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrResourceUtil.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrResourceUtil.java?rev=1465904&r1=1465903&r2=1465904&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrResourceUtil.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrResourceUtil.java
Tue Apr  9 06:36:41 2013
@@ -127,6 +127,10 @@ public class JcrResourceUtil {
             val = fac.createValue((BigDecimal)value);
         } else if (value instanceof Long) {
             val = fac.createValue((Long)value);
+        } else if (value instanceof Short) {
+            val = fac.createValue((Short)value);
+        } else if (value instanceof Integer) {
+            val = fac.createValue((Integer)value);
         } else if (value instanceof Number) {
             val = fac.createValue(((Number)value).doubleValue());
         } else if (value instanceof Boolean) {



Mime
View raw message