Add missing @Nullable annotations on parameters
Issue: SPR-15540
This commit is contained in:
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactoryBean;
|
||||
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
@@ -55,7 +56,7 @@ class EmbeddedDatabaseBeanDefinitionParser extends AbstractBeanDefinitionParser
|
||||
|
||||
|
||||
@Override
|
||||
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
|
||||
protected AbstractBeanDefinition parseInternal(@Nullable Element element, @Nullable ParserContext parserContext) {
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(EmbeddedDatabaseFactoryBean.class);
|
||||
setGenerateUniqueDatabaseNameFlag(element, builder);
|
||||
setDatabaseName(element, builder);
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.jdbc.datasource.init.DataSourceInitializer;
|
||||
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.beans.factory.xml.BeanDefinitionParser} that parses an {@code initialize-database}
|
||||
@@ -38,7 +39,7 @@ import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
|
||||
class InitializeDatabaseBeanDefinitionParser extends AbstractBeanDefinitionParser {
|
||||
|
||||
@Override
|
||||
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
|
||||
protected AbstractBeanDefinition parseInternal(@Nullable Element element, @Nullable ParserContext parserContext) {
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(DataSourceInitializer.class);
|
||||
builder.addPropertyReference("dataSource", element.getAttribute("data-source"));
|
||||
builder.addPropertyValue("enabled", element.getAttribute("enabled"));
|
||||
|
||||
@@ -660,7 +660,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T query(String sql, PreparedStatementSetter pss, ResultSetExtractor<T> rse) throws DataAccessException {
|
||||
public <T> T query(String sql, @Nullable PreparedStatementSetter pss, ResultSetExtractor<T> rse) throws DataAccessException {
|
||||
return query(new SimplePreparedStatementCreator(sql), pss, rse);
|
||||
}
|
||||
|
||||
@@ -675,7 +675,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T query(String sql, ResultSetExtractor<T> rse, Object... args) throws DataAccessException {
|
||||
public <T> T query(String sql, ResultSetExtractor<T> rse, @Nullable Object... args) throws DataAccessException {
|
||||
return query(sql, newArgPreparedStatementSetter(args), rse);
|
||||
}
|
||||
|
||||
@@ -685,7 +685,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void query(String sql, PreparedStatementSetter pss, RowCallbackHandler rch) throws DataAccessException {
|
||||
public void query(String sql, @Nullable PreparedStatementSetter pss, RowCallbackHandler rch) throws DataAccessException {
|
||||
query(sql, pss, new RowCallbackHandlerResultSetExtractor(rch));
|
||||
}
|
||||
|
||||
@@ -700,7 +700,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void query(String sql, RowCallbackHandler rch, Object... args) throws DataAccessException {
|
||||
public void query(String sql, RowCallbackHandler rch, @Nullable Object... args) throws DataAccessException {
|
||||
query(sql, newArgPreparedStatementSetter(args), rch);
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> List<T> query(String sql, PreparedStatementSetter pss, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
public <T> List<T> query(String sql, @Nullable PreparedStatementSetter pss, RowMapper<T> rowMapper) throws DataAccessException {
|
||||
return query(sql, pss, new RowMapperResultSetExtractor<>(rowMapper));
|
||||
}
|
||||
|
||||
@@ -725,7 +725,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> List<T> query(String sql, RowMapper<T> rowMapper, Object... args) throws DataAccessException {
|
||||
public <T> List<T> query(String sql, RowMapper<T> rowMapper, @Nullable Object... args) throws DataAccessException {
|
||||
return query(sql, args, new RowMapperResultSetExtractor<>(rowMapper));
|
||||
}
|
||||
|
||||
@@ -744,7 +744,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T queryForObject(String sql, RowMapper<T> rowMapper, Object... args) throws DataAccessException {
|
||||
public <T> T queryForObject(String sql, RowMapper<T> rowMapper, @Nullable Object... args) throws DataAccessException {
|
||||
List<T> results = query(sql, args, new RowMapperResultSetExtractor<>(rowMapper, 1));
|
||||
return DataAccessUtils.requiredSingleResult(results);
|
||||
}
|
||||
@@ -762,7 +762,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T queryForObject(String sql, Class<T> requiredType, Object... args) throws DataAccessException {
|
||||
public <T> T queryForObject(String sql, Class<T> requiredType, @Nullable Object... args) throws DataAccessException {
|
||||
return queryForObject(sql, args, getSingleColumnRowMapper(requiredType));
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryForMap(String sql, Object... args) throws DataAccessException {
|
||||
public Map<String, Object> queryForMap(String sql, @Nullable Object... args) throws DataAccessException {
|
||||
return queryForObject(sql, args, getColumnMapRowMapper());
|
||||
}
|
||||
|
||||
@@ -787,7 +787,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> List<T> queryForList(String sql, Class<T> elementType, Object... args) throws DataAccessException {
|
||||
public <T> List<T> queryForList(String sql, Class<T> elementType, @Nullable Object... args) throws DataAccessException {
|
||||
return query(sql, args, getSingleColumnRowMapper(elementType));
|
||||
}
|
||||
|
||||
@@ -797,7 +797,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryForList(String sql, Object... args) throws DataAccessException {
|
||||
public List<Map<String, Object>> queryForList(String sql, @Nullable Object... args) throws DataAccessException {
|
||||
return query(sql, args, getColumnMapRowMapper());
|
||||
}
|
||||
|
||||
@@ -807,7 +807,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqlRowSet queryForRowSet(String sql, Object... args) throws DataAccessException {
|
||||
public SqlRowSet queryForRowSet(String sql, @Nullable Object... args) throws DataAccessException {
|
||||
return query(sql, args, new SqlRowSetResultSetExtractor());
|
||||
}
|
||||
|
||||
@@ -875,7 +875,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(String sql, PreparedStatementSetter pss) throws DataAccessException {
|
||||
public int update(String sql, @Nullable PreparedStatementSetter pss) throws DataAccessException {
|
||||
return update(new SimplePreparedStatementCreator(sql), pss);
|
||||
}
|
||||
|
||||
@@ -885,7 +885,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(String sql, Object... args) throws DataAccessException {
|
||||
public int update(String sql, @Nullable Object... args) throws DataAccessException {
|
||||
return update(sql, newArgPreparedStatementSetter(args));
|
||||
}
|
||||
|
||||
|
||||
@@ -110,9 +110,8 @@ public abstract class StatementCreatorUtils {
|
||||
/**
|
||||
* Derive a default SQL type from the given Java type.
|
||||
* @param javaType the Java type to translate
|
||||
* @return the corresponding SQL type, or {@code null} if none found
|
||||
* @return the corresponding SQL type, or {@link SqlTypeValue#TYPE_UNKNOWN} if none found
|
||||
*/
|
||||
@Nullable
|
||||
public static int javaTypeToSqlParameterType(Class<?> javaType) {
|
||||
Integer sqlType = javaTypeToSqlTypeMap.get(javaType);
|
||||
if (sqlType != null) {
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.jdbc.core.SqlInOutParameter;
|
||||
import org.springframework.jdbc.core.SqlOutParameter;
|
||||
import org.springframework.jdbc.core.SqlParameter;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -105,8 +106,8 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeWithProcedureColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName,
|
||||
String schemaName, String procedureName) throws SQLException {
|
||||
public void initializeWithProcedureColumnMetaData(DatabaseMetaData databaseMetaData, @Nullable String catalogName,
|
||||
@Nullable String schemaName, String procedureName) throws SQLException {
|
||||
|
||||
this.procedureColumnMetaDataUsed = true;
|
||||
processProcedureColumns(databaseMetaData, catalogName, schemaName, procedureName);
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.dao.DataAccessResourceFailureException;
|
||||
import org.springframework.jdbc.support.JdbcUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* A generic implementation of the {@link TableMetaDataProvider} that should provide
|
||||
@@ -212,8 +213,8 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName,
|
||||
String schemaName, String tableName) throws SQLException {
|
||||
public void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData, @Nullable String catalogName,
|
||||
@Nullable String schemaName, String tableName) throws SQLException {
|
||||
|
||||
this.tableColumnMetaDataUsed = true;
|
||||
locateTableAndProcessMetaData(databaseMetaData, catalogName, schemaName, tableName);
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.sql.SQLException;
|
||||
import java.sql.Types;
|
||||
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
@@ -103,7 +104,7 @@ public class OracleTableMetaDataProvider extends GenericTableMetaDataProvider {
|
||||
|
||||
@Override
|
||||
public void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData,
|
||||
String catalogName, String schemaName, String tableName) throws SQLException {
|
||||
@Nullable String catalogName, @Nullable String schemaName, String tableName) throws SQLException {
|
||||
|
||||
if (!this.includeSynonyms) {
|
||||
logger.debug("Defaulting to no synonyms in table metadata lookup");
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Map;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -67,7 +68,7 @@ public class GenericSqlQuery<T> extends SqlQuery<T> {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected RowMapper<T> newRowMapper(Object[] parameters, Map<?, ?> context) {
|
||||
protected RowMapper<T> newRowMapper(@Nullable Object[] parameters, Map<?, ?> context) {
|
||||
return (this.rowMapper != null ? this.rowMapper : BeanUtils.instantiateClass(this.rowMapperClass));
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ import java.sql.SQLException;
|
||||
import java.util.Map;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Reusable query in which concrete subclasses must implement the abstract
|
||||
* mapRow(ResultSet, int) method to convert each row of the JDBC ResultSet
|
||||
@@ -59,7 +61,7 @@ public abstract class MappingSqlQuery<T> extends MappingSqlQueryWithParameters<T
|
||||
* @see #mapRow(ResultSet, int)
|
||||
*/
|
||||
@Override
|
||||
protected final T mapRow(ResultSet rs, int rowNum, Object[] parameters, Map<?, ?> context)
|
||||
protected final T mapRow(ResultSet rs, int rowNum, @Nullable Object[] parameters, @Nullable Map<?, ?> context)
|
||||
throws SQLException {
|
||||
|
||||
return mapRow(rs, rowNum);
|
||||
|
||||
@@ -72,7 +72,7 @@ public abstract class MappingSqlQueryWithParameters<T> extends SqlQuery<T> {
|
||||
* implementation of the mapRow() method.
|
||||
*/
|
||||
@Override
|
||||
protected RowMapper<T> newRowMapper(Object[] parameters, Map<?, ?> context) {
|
||||
protected RowMapper<T> newRowMapper(@Nullable Object[] parameters, Map<?, ?> context) {
|
||||
return new RowMapperImpl(parameters, context);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public abstract class UpdatableSqlQuery<T> extends SqlQuery<T> {
|
||||
* implementation of the {@code updateRow()} method.
|
||||
*/
|
||||
@Override
|
||||
protected RowMapper<T> newRowMapper(Object[] parameters, Map<?, ?> context) {
|
||||
protected RowMapper<T> newRowMapper(@Nullable Object[] parameters, Map<?, ?> context) {
|
||||
return new RowMapperImpl(context);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class AbstractFallbackSQLExceptionTranslator implements SQLExcep
|
||||
* {@link #getFallbackTranslator() fallback translator} if necessary.
|
||||
*/
|
||||
@Override
|
||||
public DataAccessException translate(String task, String sql, SQLException ex) {
|
||||
public DataAccessException translate(String task, @Nullable String sql, SQLException ex) {
|
||||
Assert.notNull(ex, "Cannot translate a null SQLException");
|
||||
if (task == null) {
|
||||
task = "";
|
||||
|
||||
@@ -167,7 +167,7 @@ public class SQLErrorCodeSQLExceptionTranslator extends AbstractFallbackSQLExcep
|
||||
|
||||
|
||||
@Override
|
||||
protected DataAccessException doTranslate(String task, String sql, SQLException ex) {
|
||||
protected DataAccessException doTranslate(String task, @Nullable String sql, SQLException ex) {
|
||||
SQLException sqlEx = ex;
|
||||
if (sqlEx instanceof BatchUpdateException && sqlEx.getNextException() != null) {
|
||||
SQLException nestedSqlEx = sqlEx.getNextException();
|
||||
@@ -297,6 +297,7 @@ public class SQLErrorCodeSQLExceptionTranslator extends AbstractFallbackSQLExcep
|
||||
* as a nested root cause. This implementation always returns null, meaning that
|
||||
* the translator always falls back to the default error codes.
|
||||
*/
|
||||
@Nullable
|
||||
protected DataAccessException customTranslate(String task, @Nullable String sql, SQLException sqlEx) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import org.springframework.dao.QueryTimeoutException;
|
||||
import org.springframework.dao.RecoverableDataAccessException;
|
||||
import org.springframework.dao.TransientDataAccessResourceException;
|
||||
import org.springframework.jdbc.BadSqlGrammarException;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link SQLExceptionTranslator} implementation which analyzes the specific
|
||||
@@ -62,7 +63,8 @@ public class SQLExceptionSubclassTranslator extends AbstractFallbackSQLException
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DataAccessException doTranslate(String task, String sql, SQLException ex) {
|
||||
@Nullable
|
||||
protected DataAccessException doTranslate(String task, @Nullable String sql, SQLException ex) {
|
||||
if (ex instanceof SQLTransientException) {
|
||||
if (ex instanceof SQLTransientConnectionException) {
|
||||
return new TransientDataAccessResourceException(buildMessage(task, sql, ex), ex);
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.dao.QueryTimeoutException;
|
||||
import org.springframework.dao.TransientDataAccessResourceException;
|
||||
import org.springframework.jdbc.BadSqlGrammarException;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link SQLExceptionTranslator} implementation that analyzes the SQL state in
|
||||
@@ -87,7 +88,7 @@ public class SQLStateSQLExceptionTranslator extends AbstractFallbackSQLException
|
||||
|
||||
|
||||
@Override
|
||||
protected DataAccessException doTranslate(String task, String sql, SQLException ex) {
|
||||
protected DataAccessException doTranslate(String task, @Nullable String sql, SQLException ex) {
|
||||
// First, the getSQLState check...
|
||||
String sqlState = getSqlState(ex);
|
||||
if (sqlState != null && sqlState.length() >= 2) {
|
||||
|
||||
@@ -31,6 +31,8 @@ import java.sql.SQLException;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Default implementation of the {@link LobHandler} interface.
|
||||
* Invokes the direct accessor methods that {@code java.sql.ResultSet}
|
||||
@@ -218,7 +220,7 @@ public class DefaultLobHandler extends AbstractLobHandler {
|
||||
protected class DefaultLobCreator implements LobCreator {
|
||||
|
||||
@Override
|
||||
public void setBlobAsBytes(PreparedStatement ps, int paramIndex, byte[] content)
|
||||
public void setBlobAsBytes(PreparedStatement ps, int paramIndex, @Nullable byte[] content)
|
||||
throws SQLException {
|
||||
|
||||
if (streamAsLob) {
|
||||
@@ -248,7 +250,7 @@ public class DefaultLobHandler extends AbstractLobHandler {
|
||||
|
||||
@Override
|
||||
public void setBlobAsBinaryStream(
|
||||
PreparedStatement ps, int paramIndex, InputStream binaryStream, int contentLength)
|
||||
PreparedStatement ps, int paramIndex, @Nullable InputStream binaryStream, int contentLength)
|
||||
throws SQLException {
|
||||
|
||||
if (streamAsLob) {
|
||||
@@ -285,7 +287,7 @@ public class DefaultLobHandler extends AbstractLobHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClobAsString(PreparedStatement ps, int paramIndex, String content)
|
||||
public void setClobAsString(PreparedStatement ps, int paramIndex, @Nullable String content)
|
||||
throws SQLException {
|
||||
|
||||
if (streamAsLob) {
|
||||
@@ -315,7 +317,7 @@ public class DefaultLobHandler extends AbstractLobHandler {
|
||||
|
||||
@Override
|
||||
public void setClobAsAsciiStream(
|
||||
PreparedStatement ps, int paramIndex, InputStream asciiStream, int contentLength)
|
||||
PreparedStatement ps, int paramIndex, @Nullable InputStream asciiStream, int contentLength)
|
||||
throws SQLException {
|
||||
|
||||
if (streamAsLob) {
|
||||
@@ -359,7 +361,7 @@ public class DefaultLobHandler extends AbstractLobHandler {
|
||||
|
||||
@Override
|
||||
public void setClobAsCharacterStream(
|
||||
PreparedStatement ps, int paramIndex, Reader characterStream, int contentLength)
|
||||
PreparedStatement ps, int paramIndex, @Nullable Reader characterStream, int contentLength)
|
||||
throws SQLException {
|
||||
|
||||
if (streamAsLob) {
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.dao.DataAccessResourceFailureException;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
/**
|
||||
@@ -56,7 +57,7 @@ public class TemporaryLobCreator implements LobCreator {
|
||||
|
||||
|
||||
@Override
|
||||
public void setBlobAsBytes(PreparedStatement ps, int paramIndex, byte[] content)
|
||||
public void setBlobAsBytes(PreparedStatement ps, int paramIndex, @Nullable byte[] content)
|
||||
throws SQLException {
|
||||
|
||||
Blob blob = ps.getConnection().createBlob();
|
||||
@@ -73,7 +74,7 @@ public class TemporaryLobCreator implements LobCreator {
|
||||
|
||||
@Override
|
||||
public void setBlobAsBinaryStream(
|
||||
PreparedStatement ps, int paramIndex, InputStream binaryStream, int contentLength)
|
||||
PreparedStatement ps, int paramIndex, @Nullable InputStream binaryStream, int contentLength)
|
||||
throws SQLException {
|
||||
|
||||
Blob blob = ps.getConnection().createBlob();
|
||||
@@ -95,7 +96,7 @@ public class TemporaryLobCreator implements LobCreator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClobAsString(PreparedStatement ps, int paramIndex, String content)
|
||||
public void setClobAsString(PreparedStatement ps, int paramIndex, @Nullable String content)
|
||||
throws SQLException {
|
||||
|
||||
Clob clob = ps.getConnection().createClob();
|
||||
@@ -112,7 +113,7 @@ public class TemporaryLobCreator implements LobCreator {
|
||||
|
||||
@Override
|
||||
public void setClobAsAsciiStream(
|
||||
PreparedStatement ps, int paramIndex, InputStream asciiStream, int contentLength)
|
||||
PreparedStatement ps, int paramIndex, @Nullable InputStream asciiStream, int contentLength)
|
||||
throws SQLException {
|
||||
|
||||
Clob clob = ps.getConnection().createClob();
|
||||
@@ -135,7 +136,7 @@ public class TemporaryLobCreator implements LobCreator {
|
||||
|
||||
@Override
|
||||
public void setClobAsCharacterStream(
|
||||
PreparedStatement ps, int paramIndex, Reader characterStream, int contentLength)
|
||||
PreparedStatement ps, int paramIndex, @Nullable Reader characterStream, int contentLength)
|
||||
throws SQLException {
|
||||
|
||||
Clob clob = ps.getConnection().createClob();
|
||||
|
||||
Reference in New Issue
Block a user