Fix typos and suppress warnings in JdbcTemplate

This commit is contained in:
Sam Brannen 2012-10-28 15:43:16 +01:00
parent e4158f91a4
commit c79c4c6e25
1 changed files with 12 additions and 10 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2010 the original author or authors. * Copyright 2002-2012 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -134,8 +134,8 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
/** /**
* If this variable is set to true then all results from a stored procedure call * If this variable is set to true then all results from a stored procedure call
* that don't have a corresponding SqlOutParameter declaration will be bypassed. * that don't have a corresponding SqlOutParameter declaration will be bypassed.
* All other results processng will be take place unless the variable * All other results processing will be take place unless the variable
* <code>skipResultsProcessing</code> is set to <code>true</code> * <code>skipResultsProcessing</code> is set to <code>true</code>.
*/ */
private boolean skipUndeclaredResults = false; private boolean skipUndeclaredResults = false;
@ -274,9 +274,9 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
} }
/** /**
* Set whether results processing should be skipped. Can be used to optimize callable * Set whether results processing should be skipped. Can be used to optimize callable
* statement processing when we know that no results are being passed back - the processing * statement processing when we know that no results are being passed back - the processing
* of out parameter will still take place. This can be used to avoid a bug in some older * of out parameter will still take place. This can be used to avoid a bug in some older
* Oracle JDBC drivers like 10.1.0.2. * Oracle JDBC drivers like 10.1.0.2.
*/ */
public void setSkipResultsProcessing(boolean skipResultsProcessing) { public void setSkipResultsProcessing(boolean skipResultsProcessing) {
@ -291,7 +291,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
} }
/** /**
* Set whether undelared results should be skipped. * Set whether undeclared results should be skipped.
*/ */
public void setSkipUndeclaredResults(boolean skipUndeclaredResults) { public void setSkipUndeclaredResults(boolean skipUndeclaredResults) {
this.skipUndeclaredResults = skipUndeclaredResults; this.skipUndeclaredResults = skipUndeclaredResults;
@ -1083,9 +1083,10 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
* Extract returned ResultSets from the completed stored procedure. * Extract returned ResultSets from the completed stored procedure.
* @param cs JDBC wrapper for the stored procedure * @param cs JDBC wrapper for the stored procedure
* @param updateCountParameters Parameter list of declared update count parameters for the stored procedure * @param updateCountParameters Parameter list of declared update count parameters for the stored procedure
* @param resultSetParameters Parameter list of declared resturn resultSet parameters for the stored procedure * @param resultSetParameters Parameter list of declared resultSet parameters for the stored procedure
* @return Map that contains returned results * @return Map that contains returned results
*/ */
@SuppressWarnings("rawtypes")
protected Map<String, Object> extractReturnedResults( protected Map<String, Object> extractReturnedResults(
CallableStatement cs, List updateCountParameters, List resultSetParameters, int updateCount) CallableStatement cs, List updateCountParameters, List resultSetParameters, int updateCount)
throws SQLException { throws SQLException {
@ -1189,7 +1190,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
* @param param the corresponding stored procedure parameter * @param param the corresponding stored procedure parameter
* @return Map that contains returned results * @return Map that contains returned results
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings({ "unchecked", "rawtypes" })
protected Map<String, Object> processResultSet(ResultSet rs, ResultSetSupportingSqlParameter param) throws SQLException { protected Map<String, Object> processResultSet(ResultSet rs, ResultSetSupportingSqlParameter param) throws SQLException {
if (rs == null) { if (rs == null) {
return Collections.emptyMap(); return Collections.emptyMap();
@ -1286,7 +1287,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
/** /**
* Create a new ArgPreparedStatementSetter using the args passed in. This method allows the * Create a new ArgPreparedStatementSetter using the args passed in. This method allows the
* creation to be overridden by sub-classes. * creation to be overridden by sub-classes.
* @param args object array woth arguments * @param args object array with arguments
* @return the new PreparedStatementSetter * @return the new PreparedStatementSetter
*/ */
protected PreparedStatementSetter newArgPreparedStatementSetter(Object[] args) { protected PreparedStatementSetter newArgPreparedStatementSetter(Object[] args) {
@ -1296,7 +1297,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
/** /**
* Create a new ArgTypePreparedStatementSetter using the args and argTypes passed in. * Create a new ArgTypePreparedStatementSetter using the args and argTypes passed in.
* This method allows the creation to be overridden by sub-classes. * This method allows the creation to be overridden by sub-classes.
* @param args object array woth arguments * @param args object array with arguments
* @param argTypes int array of SQLTypes for arguments * @param argTypes int array of SQLTypes for arguments
* @return the new PreparedStatementSetter * @return the new PreparedStatementSetter
*/ */
@ -1368,6 +1369,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
this.target = target; this.target = target;
} }
@SuppressWarnings("rawtypes")
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
// Invocation on ConnectionProxy interface coming in... // Invocation on ConnectionProxy interface coming in...