https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/core/JdbcOperations.html#batchUpdate-java.lang.String...-

In the spring java doc for this method, it says "Returns: an array of the number of rows affected by each statement". This statement is misleading because "The number of rows" would never be negative.

However, this method could delegate to https://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Statement.html#executeBatch() where negative values are possible, such as SUCCESS_NO_INFO/-2

The Spring javadoc should make this clear.