HHH-8741 - More checkstyle cleanups
This commit is contained in:
parent
241868e1dd
commit
e59a0170af
|
@ -98,7 +98,7 @@ public class VersionValue implements UnsavedValueStrategy {
|
|||
return Boolean.TRUE;
|
||||
}
|
||||
if ( version instanceof Number ) {
|
||||
return ((Number) version).longValue() < 0l;
|
||||
return ((Number) version).longValue() < 0L;
|
||||
}
|
||||
throw new MappingException( "unsaved-value NEGATIVE may only be used with short, int and long types" );
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ public class LongType
|
|||
public LongType() {
|
||||
super( BigIntTypeDescriptor.INSTANCE, LongTypeDescriptor.INSTANCE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "long";
|
||||
|
@ -57,30 +58,37 @@ public class LongType
|
|||
public String[] getRegistrationKeys() {
|
||||
return new String[] { getName(), long.class.getName(), Long.class.getName() };
|
||||
}
|
||||
|
||||
@Override
|
||||
public Serializable getDefaultValue() {
|
||||
return ZERO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getPrimitiveClass() {
|
||||
return long.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long stringToObject(String xml) throws Exception {
|
||||
return Long.valueOf( xml );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long next(Long current, SessionImplementor session) {
|
||||
return current + 1l;
|
||||
return current + 1L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long seed(SessionImplementor session) {
|
||||
return ZERO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Comparator<Long> getComparator() {
|
||||
return getJavaTypeDescriptor().getComparator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String objectToSQLString(Long value, Dialect dialect) throws Exception {
|
||||
return value.toString();
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class ArgumentsTools {
|
|||
}
|
||||
|
||||
public static void checkPositive(Number i, String paramName) {
|
||||
if ( i.longValue() <= 0l ) {
|
||||
if ( i.longValue() <= 0L ) {
|
||||
throw new IllegalArgumentException( paramName + " has to be greater than 0." );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,6 +96,9 @@
|
|||
<property name="severity" value="warning" />
|
||||
</module>
|
||||
<module name="EqualsHashCode" />
|
||||
<module name="FinalLocalVariable">
|
||||
<property name="severity" value="warning" />
|
||||
</module>
|
||||
<module name="MissingSwitchDefault">
|
||||
<property name="severity" value="warning" />
|
||||
</module>
|
||||
|
|
Loading…
Reference in New Issue