mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
No effective change - code cleanup - remove unnecessary boxing
This commit is contained in:
1 parent
ba3b1fea6f
commit
9fe47194ff
34 files changed
+55
-78
No files matched your search
@@ -421,9 +421,7 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
|
||||
|
||||
// populate a smaller/minimal array
|
||||
int[] unload = new int[pos];
|
||||
for (int i = 0; i < pos; i++) {
|
||||
unload[i] = props[i];
|
||||
}
|
||||
System.arraycopy(props, 0, unload, 0, pos);
|
||||
return unload;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.avaje.ebeaninternal.server.deploy;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
+2
-3
@@ -19,8 +19,7 @@ public class GeneratedCounter implements GeneratedProperty {
|
||||
* Always returns a 1.
|
||||
*/
|
||||
public Object getInsertValue(BeanProperty prop, EntityBean bean) {
|
||||
Integer i = Integer.valueOf(1);
|
||||
return BasicTypeConverter.convert(i, numberType);
|
||||
return BasicTypeConverter.convert(1, numberType);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,7 +27,7 @@ public class GeneratedCounter implements GeneratedProperty {
|
||||
*/
|
||||
public Object getUpdateValue(BeanProperty prop, EntityBean bean) {
|
||||
Number currVal = (Number) prop.getValue(bean);
|
||||
Integer nextVal = Integer.valueOf(currVal.intValue() + 1);
|
||||
Integer nextVal = currVal.intValue() + 1;
|
||||
return BasicTypeConverter.convert(nextVal, numberType);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ public class GeneratedCounterInteger implements GeneratedProperty {
|
||||
* Always returns a 1.
|
||||
*/
|
||||
public Object getInsertValue(BeanProperty prop, EntityBean bean) {
|
||||
return Integer.valueOf(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,7 +24,7 @@ public class GeneratedCounterInteger implements GeneratedProperty {
|
||||
*/
|
||||
public Object getUpdateValue(BeanProperty prop, EntityBean bean) {
|
||||
Integer i = (Integer) prop.getValue(bean);
|
||||
return Integer.valueOf(i.intValue() + 1);
|
||||
return i.intValue() + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ public class GeneratedCounterLong implements GeneratedProperty {
|
||||
* Always returns a 1.
|
||||
*/
|
||||
public Object getInsertValue(BeanProperty prop, EntityBean bean) {
|
||||
return Long.valueOf(1);
|
||||
return (long) 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,7 +24,7 @@ public class GeneratedCounterLong implements GeneratedProperty {
|
||||
*/
|
||||
public Object getUpdateValue(BeanProperty prop, EntityBean bean) {
|
||||
Long i = (Long) prop.getValue(bean);
|
||||
return Long.valueOf(i.longValue() + 1);
|
||||
return i.longValue() + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ public class GeneratedInsertLong implements GeneratedProperty {
|
||||
* Return the current time as a Timestamp.
|
||||
*/
|
||||
public Object getInsertValue(BeanProperty prop, EntityBean bean) {
|
||||
return Long.valueOf(System.currentTimeMillis());
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -12,14 +12,14 @@ public class GeneratedUpdateLong implements GeneratedProperty {
|
||||
* Return now as a Timestamp.
|
||||
*/
|
||||
public Object getInsertValue(BeanProperty prop, EntityBean bean) {
|
||||
return Long.valueOf(System.currentTimeMillis());
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return now as a Timestamp.
|
||||
*/
|
||||
public Object getUpdateValue(BeanProperty prop, EntityBean bean) {
|
||||
return Long.valueOf(System.currentTimeMillis());
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -194,7 +194,7 @@ public class DeployInheritInfo {
|
||||
discriminatorStringValue = value;
|
||||
// convert the value if desired
|
||||
if (discriminatorType == Types.INTEGER){
|
||||
this.discriminatorObjectValue = Integer.valueOf(value.toString());
|
||||
this.discriminatorObjectValue = Integer.valueOf(value);
|
||||
} else {
|
||||
this.discriminatorObjectValue = value;
|
||||
}
|
||||
@@ -253,11 +253,7 @@ public class DeployInheritInfo {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("InheritInfo[").append(type.getName()).append("]");
|
||||
sb.append(" root[").append(parent.getName()).append("]");
|
||||
sb.append(" disValue[").append(discriminatorStringValue).append("]");
|
||||
return sb.toString();
|
||||
return "InheritInfo[" + type.getName() + "]" + " root[" + parent.getName() + "]" + " disValue[" + discriminatorStringValue + "]";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user