diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/VersionValue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/VersionValue.java index a3114ad506..ae72aa727e 100755 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/VersionValue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/VersionValue.java @@ -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" ); } diff --git a/hibernate-core/src/main/java/org/hibernate/type/LongType.java b/hibernate-core/src/main/java/org/hibernate/type/LongType.java index 4ce675a82f..22fbbebf4e 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/LongType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/LongType.java @@ -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 getComparator() { return getJavaTypeDescriptor().getComparator(); } + @Override public String objectToSQLString(Long value, Dialect dialect) throws Exception { return value.toString(); diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/ArgumentsTools.java b/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/ArgumentsTools.java index 8f481b70a0..c9546cfe7c 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/ArgumentsTools.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/ArgumentsTools.java @@ -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." ); } } diff --git a/shared/config/checkstyle/checkstyle.xml b/shared/config/checkstyle/checkstyle.xml index 806f7c2e86..5a8ce9409c 100644 --- a/shared/config/checkstyle/checkstyle.xml +++ b/shared/config/checkstyle/checkstyle.xml @@ -96,6 +96,9 @@ + + +