diff --git a/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/string/ORecordSerializerStringAbstract.java b/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/string/ORecordSerializerStringAbstract.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/string/ORecordSerializerStringAbstract.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/string/ORecordSerializerStringAbstract.java
@@ -400,6 +400,9 @@ public abstract class ORecordSerializerStringAbstract implements ORecordSerializ
 				}

 		}

 

-		return integer ? new Integer(iValue) : new Float(iValue);

+		if (integer)

+			return new Integer(iValue);

+		else

+			return new Float(iValue);

 	}

 }
Fixed nasty ClassCastException in indexes for a Java bug?