Fix of issue
@@ -25,7 +25,13 @@ import com.orientechnologies.common.io.OIOUtils;
import com.orientechnologies.common.log.OLogManager;
import com.orientechnologies.common.types.OBinary;
import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal;
-import com.orientechnologies.orient.core.db.record.*;
+import com.orientechnologies.orient.core.db.record.OIdentifiable;
+import com.orientechnologies.orient.core.db.record.ORecordLazyList;
+import com.orientechnologies.orient.core.db.record.ORecordLazyMap;
+import com.orientechnologies.orient.core.db.record.ORecordLazySet;
+import com.orientechnologies.orient.core.db.record.OTrackedList;
+import com.orientechnologies.orient.core.db.record.OTrackedMap;
+import com.orientechnologies.orient.core.db.record.OTrackedSet;
import com.orientechnologies.orient.core.db.record.ridbag.ORidBag;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.id.ORecordId;
@@ -38,7 +44,16 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.ParseException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
/**
* Generic representation of a type.<br>
@@ -336,9 +351,12 @@ public enum OType {
} else if (iTargetClass.equals(Integer.TYPE) || iTargetClass.equals(Integer.class)) {
if (iValue instanceof Integer)
return iValue;
- else if (iValue instanceof String)
+ else if (iValue instanceof String) {
+ if (iValue.toString().equals("")) {
+ return null;
+ }
return Integer.parseInt((String) iValue);
- else
+ } else
return ((Number) iValue).intValue();
} else if (iTargetClass.equals(Long.TYPE) || iTargetClass.equals(Long.class)) {
@@ -671,7 +689,6 @@ public enum OType {
context = new BigDecimal(context.intValue());
}
-
return new Number[] { context, max };
}
