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
+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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user