HHH-13496 Excessive relyiance on auto-boxing
This commit is contained in:
parent
433a7904c1
commit
f2215dab47
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public class DurationJavaDescriptor extends AbstractTypeDescriptor<Duration> {
|
|||
if ( string == null ) {
|
||||
return null;
|
||||
}
|
||||
return Duration.ofNanos( Long.valueOf( string ) );
|
||||
return Duration.ofNanos( Long.parseLong( string ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue