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;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
if ( version instanceof Number ) {
|
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" );
|
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() {
|
public LongType() {
|
||||||
super( BigIntTypeDescriptor.INSTANCE, LongTypeDescriptor.INSTANCE );
|
super( BigIntTypeDescriptor.INSTANCE, LongTypeDescriptor.INSTANCE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "long";
|
return "long";
|
||||||
|
@ -57,30 +58,37 @@ public class LongType
|
||||||
public String[] getRegistrationKeys() {
|
public String[] getRegistrationKeys() {
|
||||||
return new String[] { getName(), long.class.getName(), Long.class.getName() };
|
return new String[] { getName(), long.class.getName(), Long.class.getName() };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable getDefaultValue() {
|
public Serializable getDefaultValue() {
|
||||||
return ZERO;
|
return ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class getPrimitiveClass() {
|
public Class getPrimitiveClass() {
|
||||||
return long.class;
|
return long.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long stringToObject(String xml) throws Exception {
|
public Long stringToObject(String xml) throws Exception {
|
||||||
return Long.valueOf( xml );
|
return Long.valueOf( xml );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long next(Long current, SessionImplementor session) {
|
public Long next(Long current, SessionImplementor session) {
|
||||||
return current + 1l;
|
return current + 1L;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long seed(SessionImplementor session) {
|
public Long seed(SessionImplementor session) {
|
||||||
return ZERO;
|
return ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Comparator<Long> getComparator() {
|
public Comparator<Long> getComparator() {
|
||||||
return getJavaTypeDescriptor().getComparator();
|
return getJavaTypeDescriptor().getComparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String objectToSQLString(Long value, Dialect dialect) throws Exception {
|
public String objectToSQLString(Long value, Dialect dialect) throws Exception {
|
||||||
return value.toString();
|
return value.toString();
|
||||||
|
|
|
@ -34,7 +34,7 @@ public abstract class ArgumentsTools {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void checkPositive(Number i, String paramName) {
|
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." );
|
throw new IllegalArgumentException( paramName + " has to be greater than 0." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,9 @@
|
||||||
<property name="severity" value="warning" />
|
<property name="severity" value="warning" />
|
||||||
</module>
|
</module>
|
||||||
<module name="EqualsHashCode" />
|
<module name="EqualsHashCode" />
|
||||||
|
<module name="FinalLocalVariable">
|
||||||
|
<property name="severity" value="warning" />
|
||||||
|
</module>
|
||||||
<module name="MissingSwitchDefault">
|
<module name="MissingSwitchDefault">
|
||||||
<property name="severity" value="warning" />
|
<property name="severity" value="warning" />
|
||||||
</module>
|
</module>
|
||||||
|
|
Loading…
Reference in New Issue