HHH-8319 checkstyle
This commit is contained in:
parent
5abe02f92d
commit
77fd4d6a89
|
@ -57,19 +57,19 @@ public class MySQL5Dialect extends MySQLDialect {
|
||||||
return EXTRACTER;
|
return EXTRACTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ViolatedConstraintNameExtracter EXTRACTER = new TemplatedViolatedConstraintNameExtracter() {
|
private static final ViolatedConstraintNameExtracter EXTRACTER = new TemplatedViolatedConstraintNameExtracter() {
|
||||||
|
|
||||||
public String extractConstraintName(SQLException sqle) {
|
public String extractConstraintName(SQLException sqle) {
|
||||||
try {
|
try {
|
||||||
int sqlState = Integer.valueOf( JdbcExceptionHelper.extractSqlState( sqle ) ).intValue();
|
final int sqlState = Integer.valueOf( JdbcExceptionHelper.extractSqlState( sqle ) ).intValue();
|
||||||
switch ( sqlState ) {
|
switch ( sqlState ) {
|
||||||
case 23000:
|
case 23000:
|
||||||
return extractUsingTemplate( " for key '", "'", sqle.getMessage() );
|
return extractUsingTemplate( " for key '", "'", sqle.getMessage() );
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (NumberFormatException nfe) {
|
catch ( NumberFormatException nfe ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue