https://bz.apache.org/bugzilla/show_bug.cgi?id=58533
Bug ID: 58533
Summary: DelegatingConnection should propagate SQLException
(not return null)
Product: Tomcat 8
Version: trunk
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
I noticed code in org.apache.tomcat.dbcp.dbcp2.DelegatingConnection like:
@Override
public PreparedStatement prepareStatement(String sql) throws SQLException {
checkOpen();
try {
DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
this, _conn.prepareStatement(sql));
initializeStatement(dps);
return dps;
}
catch (SQLException e) {
handleException(e);
return null;
}
}
If there is a SQLException, I would expect that that gets propagated (just like
the signature suggests), not get a null. I think this violates the spec.
This issue exists for 2 prepareStatement and 2 prepareCall implementations.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]