Fixed javadoc warnings and revised FastByteArrayOutputStream code style

This commit is contained in:
Juergen Hoeller
2015-02-27 23:49:55 +01:00
parent 45a80fa3ed
commit 540d8792fe
6 changed files with 242 additions and 233 deletions

View File

@@ -31,30 +31,30 @@ public class ScriptStatementFailedException extends ScriptException {
/**
* Construct a new {@code ScriptStatementFailedException}.
* @param statement the actual SQL statement that failed
* @param statementNumber the statement number in the SQL script (i.e.,
* @param stmt the actual SQL statement that failed
* @param stmtNumber the statement number in the SQL script (i.e.,
* the nth statement present in the resource)
* @param resource the resource from which the SQL statement was read
* @param cause the underlying cause of the failure
*/
public ScriptStatementFailedException(String statement, int statementNumber, EncodedResource resource, Throwable cause) {
super(buildErrorMessage(statement, statementNumber, resource), cause);
public ScriptStatementFailedException(String stmt, int stmtNumber, EncodedResource resource, Throwable cause) {
super(buildErrorMessage(stmt, stmtNumber, resource), cause);
}
/**
* Build an error message for an SQL script execution failure, based on
* the supplied arguments.
* @param statement the actual SQL statement that failed
* @param statementNumber the statement number in the SQL script (i.e.,
* Build an error message for an SQL script execution failure,
* based on the supplied arguments.
* @param stmt the actual SQL statement that failed
* @param stmtNumber the statement number in the SQL script (i.e.,
* the n<sup>th</sup> statement present in the resource)
* @param encodedResource the resource from which the SQL statement was read
* @return an error message suitable for an exception's <em>detail message</em>
* or logging
* @since 4.2
*/
public static String buildErrorMessage(String statement, int statementNumber, EncodedResource encodedResource) {
public static String buildErrorMessage(String stmt, int stmtNumber, EncodedResource encodedResource) {
return String.format("Failed to execute SQL script statement #%s of %s: %s",
statementNumber, encodedResource, statement);
stmtNumber, encodedResource, stmt);
}
}