У меня есть скрипт сборки ant, который выдает ошибку со следующим сообщением.
javac incompatible types by ant build
ProductDao.java:41: incompatible types
found : java.lang.Object
required: java.util.List<com.sample.dto.Product>
listProductsIds = jdbc.execute("{ call find_Product_id(?,?,?,?,?) }",
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Но если я проверю его в своей IDE затмения, все будет хорошо.JdbcTemplate и вот как я определил свой вызов.
@SuppressWarnings("unchecked")
public List<Product> getProducts(final String parent, final String tagDesc,
final int pageSize, final int pageNo,
final String userId, final int maxrowcount) {
List<Product> listProductIds = new ArrayList<Product>();
listProductIds = jdbc.execute("{ call find_Product_id(?,?,?,?,?) }",
new CallableStatementCallback() {
public Object doInCallableStatement(
CallableStatement callableStatement)
throws SQLException, DataAccessException {
callableStatement.setString(1, parent);
callableStatement.setString(2, tagDesc);
callableStatement.setInt(3, pageSize);
callableStatement.setInt(4, pageNo);
callableStatement.setString(5, userId);
callableStatement.execute();