1
1
/*
2
- * Copyright 2002-2012 the original author or authors.
2
+ * Copyright 2002-2013 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ public class PreparedStatementCreatorFactory {
48
48
/** The SQL, which won't change when the parameters change */
49
49
private final String sql ;
50
50
51
- /** List of SqlParameter objects. May not be < code> null</code> . */
51
+ /** List of SqlParameter objects. May not be {@ code null} . */
52
52
private final List <SqlParameter > declaredParameters ;
53
53
54
54
private int resultSetType = ResultSet .TYPE_FORWARD_ONLY ;
@@ -144,31 +144,31 @@ public void setNativeJdbcExtractor(NativeJdbcExtractor nativeJdbcExtractor) {
144
144
145
145
/**
146
146
* Return a new PreparedStatementSetter for the given parameters.
147
- * @param params list of parameters (may be < code> null</code> )
147
+ * @param params list of parameters (may be {@ code null} )
148
148
*/
149
- public PreparedStatementSetter newPreparedStatementSetter (List params ) {
149
+ public PreparedStatementSetter newPreparedStatementSetter (List <?> params ) {
150
150
return new PreparedStatementCreatorImpl (params != null ? params : Collections .emptyList ());
151
151
}
152
152
153
153
/**
154
154
* Return a new PreparedStatementSetter for the given parameters.
155
- * @param params the parameter array (may be < code> null</code> )
155
+ * @param params the parameter array (may be {@ code null} )
156
156
*/
157
157
public PreparedStatementSetter newPreparedStatementSetter (Object [] params ) {
158
158
return new PreparedStatementCreatorImpl (params != null ? Arrays .asList (params ) : Collections .emptyList ());
159
159
}
160
160
161
161
/**
162
162
* Return a new PreparedStatementCreator for the given parameters.
163
- * @param params list of parameters (may be < code> null</code> )
163
+ * @param params list of parameters (may be {@ code null} )
164
164
*/
165
165
public PreparedStatementCreator newPreparedStatementCreator (List <?> params ) {
166
166
return new PreparedStatementCreatorImpl (params != null ? params : Collections .emptyList ());
167
167
}
168
168
169
169
/**
170
170
* Return a new PreparedStatementCreator for the given parameters.
171
- * @param params the parameter array (may be < code> null</code> )
171
+ * @param params the parameter array (may be {@ code null} )
172
172
*/
173
173
public PreparedStatementCreator newPreparedStatementCreator (Object [] params ) {
174
174
return new PreparedStatementCreatorImpl (params != null ? Arrays .asList (params ) : Collections .emptyList ());
@@ -178,7 +178,7 @@ public PreparedStatementCreator newPreparedStatementCreator(Object[] params) {
178
178
* Return a new PreparedStatementCreator for the given parameters.
179
179
* @param sqlToUse the actual SQL statement to use (if different from
180
180
* the factory's, for example because of named parameter expanding)
181
- * @param params the parameter array (may be < code> null</code> )
181
+ * @param params the parameter array (may be {@ code null} )
182
182
*/
183
183
public PreparedStatementCreator newPreparedStatementCreator (String sqlToUse , Object [] params ) {
184
184
return new PreparedStatementCreatorImpl (
@@ -225,7 +225,7 @@ public PreparedStatementCreatorImpl(String actualSql, List parameters) {
225
225
}
226
226
227
227
public PreparedStatement createPreparedStatement (Connection con ) throws SQLException {
228
- PreparedStatement ps = null ;
228
+ PreparedStatement ps ;
229
229
if (generatedKeysColumnNames != null || returnGeneratedKeys ) {
230
230
try {
231
231
if (generatedKeysColumnNames != null ) {
@@ -263,7 +263,7 @@ public void setValues(PreparedStatement ps) throws SQLException {
263
263
int sqlColIndx = 1 ;
264
264
for (int i = 0 ; i < this .parameters .size (); i ++) {
265
265
Object in = this .parameters .get (i );
266
- SqlParameter declaredParameter = null ;
266
+ SqlParameter declaredParameter ;
267
267
// SqlParameterValue overrides declared parameter metadata, in particular for
268
268
// independence from the declared parameter position in case of named parameters.
269
269
if (in instanceof SqlParameterValue ) {
0 commit comments