incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r527647 - in /incubator/graffito/trunk/jcr/jcr-mapping/src: java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UndefinedTypeConverterImpl.java test/org/apache/portals/graffito/jcr/persistence/atomic/AtomicTest.java
Date Wed, 11 Apr 2007 20:23:44 GMT
Author: clombart
Date: Wed Apr 11 13:23:43 2007
New Revision: 527647

URL: http://svn.apache.org/viewvc?view=rev&rev=527647
Log:
Apply patch provided by Felix Meschberger for GRFT-130

Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UndefinedTypeConverterImpl.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AtomicTest.java

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UndefinedTypeConverterImpl.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UndefinedTypeConverterImpl.java?view=diff&rev=527647&r1=527646&r2=527647
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UndefinedTypeConverterImpl.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/atomictypeconverter/impl/UndefinedTypeConverterImpl.java
Wed Apr 11 13:23:43 2007
@@ -64,17 +64,17 @@
 	        
           if ((propValue.getClass() == Long.class) ||(propValue.getClass() == Integer.class))
           {
-        	  return valueFactory.createValue((Long) propValue);  
+        	  return valueFactory.createValue(((Number) propValue).longValue());  
           }
 
           if (propValue.getClass() == Double.class )
           {
-        	  return valueFactory.createValue((Double) propValue);  
+        	  return valueFactory.createValue(((Double) propValue).doubleValue());  
           }
 
           if (propValue.getClass() == Boolean.class )
           {
-        	  return valueFactory.createValue((Long) propValue);  
+        	  return valueFactory.createValue(((Boolean) propValue).booleanValue());  
           }
 
           if (propValue.getClass() == Calendar.class )
@@ -137,17 +137,17 @@
 
 			if (value.getType() == PropertyType.DOUBLE)
 			{
-				return value.getDouble();	
+				return new Double(value.getDouble());	
 			}
 
 			if (value.getType() == PropertyType.LONG)
 			{
-				return value.getLong();	
+				return new Long(value.getLong());	
 			}
 
 			if (value.getType() == PropertyType.BOOLEAN)
 			{
-				return value.getBoolean();	
+				return new Boolean(value.getBoolean());	
 			}
 
 			if (value.getType() == PropertyType.NAME)

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AtomicTest.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AtomicTest.java?view=diff&rev=527647&r1=527646&r2=527647
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AtomicTest.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/atomic/AtomicTest.java
Wed Apr 11 13:23:43 2007
@@ -177,7 +177,7 @@
             a = null;
             a = (Atomic) persistenceManager.getObject( "/test");
 
-            a.setUndefinedProperty(1.2);
+            a.setUndefinedProperty(new Double(1.2));
             persistenceManager.update(a);
             persistenceManager.save();
             



Mime
View raw message