HHH-8741 - More checkstyle cleanups

This commit is contained in:
Steve Ebersole 2013-11-23 21:30:05 -06:00
parent 241868e1dd
commit e59a0170af
4 changed files with 14 additions and 3 deletions

View File

@ -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" );
}

View File

@ -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();

View File

@ -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." );
}
}

View File

@ -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>