diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/SingularAttributeSourceBasicImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/SingularAttributeSourceBasicImpl.java index 8a8f10437f..b539fa62c1 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/SingularAttributeSourceBasicImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/SingularAttributeSourceBasicImpl.java @@ -123,14 +123,14 @@ class SingularAttributeSourceBasicImpl @Override public Boolean isInsertable() { return propertyElement.isInsert() == null - ? true + ? Boolean.TRUE : propertyElement.isInsert(); } @Override public Boolean isUpdatable() { return propertyElement.isUpdate() == null - ? true + ? Boolean.TRUE : propertyElement.isUpdate(); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/VersionAttributeSourceImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/VersionAttributeSourceImpl.java index e4c8d21751..7c6f16fa52 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/VersionAttributeSourceImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/VersionAttributeSourceImpl.java @@ -156,7 +156,7 @@ class VersionAttributeSourceImpl @Override public Boolean isInsertable() { - return versionElement.isInsert() == null ? true : versionElement.isInsert(); + return versionElement.isInsert() == null ? Boolean.TRUE : versionElement.isInsert(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/MySQL5Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/MySQL5Dialect.java index 3f79ae8fb4..0421aa4ef8 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/MySQL5Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/MySQL5Dialect.java @@ -45,7 +45,7 @@ public class MySQL5Dialect extends MySQLDialect { @Override protected String doExtractConstraintName(SQLException sqle) throws NumberFormatException { - final int sqlState = Integer.valueOf( JdbcExceptionHelper.extractSqlState( sqle ) ).intValue(); + final int sqlState = Integer.parseInt( JdbcExceptionHelper.extractSqlState( sqle ) ); switch ( sqlState ) { case 23000: return extractUsingTemplate( " for key '", "'", sqle.getMessage() ); diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQL81Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQL81Dialect.java index 9e4383385d..4792de5252 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQL81Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQL81Dialect.java @@ -422,7 +422,7 @@ public class PostgreSQL81Dialect extends Dialect { private static final ViolatedConstraintNameExtracter EXTRACTER = new TemplatedViolatedConstraintNameExtracter() { @Override protected String doExtractConstraintName(SQLException sqle) throws NumberFormatException { - final int sqlState = Integer.valueOf( JdbcExceptionHelper.extractSqlState( sqle ) ); + final int sqlState = Integer.parseInt( JdbcExceptionHelper.extractSqlState( sqle ) ); switch (sqlState) { // CHECK VIOLATION case 23514: return extractUsingTemplate( "violates check constraint \"","\"", sqle.getMessage() ); diff --git a/hibernate-core/src/main/java/org/hibernate/engine/query/spi/ParameterParser.java b/hibernate-core/src/main/java/org/hibernate/engine/query/spi/ParameterParser.java index ef46cdfbf2..45f628c495 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/query/spi/ParameterParser.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/query/spi/ParameterParser.java @@ -188,7 +188,7 @@ public class ParameterParser { final String param = sqlString.substring( indx + 1, chopLocation ); // make sure this "name" is an integral try { - recognizer.jpaPositionalParameter( Integer.valueOf( param ), indx ); + recognizer.jpaPositionalParameter( Integer.parseInt( param ), indx ); indx = chopLocation - 1; } catch( NumberFormatException e ) { diff --git a/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/DurationJavaDescriptor.java b/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/DurationJavaDescriptor.java index 5e1606d07e..e791b7060f 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/DurationJavaDescriptor.java +++ b/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/DurationJavaDescriptor.java @@ -37,7 +37,7 @@ public class DurationJavaDescriptor extends AbstractTypeDescriptor { if ( string == null ) { return null; } - return Duration.ofNanos( Long.valueOf( string ) ); + return Duration.ofNanos( Long.parseLong( string ) ); } @Override