4748495051525354
if (closed) { throw new SQLException(); } if (this.connection != null && this.connection.isClosed()) { throw new MockConnectionClosedException(); } }
666768697071727374
if (this.connection != null) { if (this.connection instanceof MockConnection) { ((MockConnection) this.connection).checkState(); } else if (this.connection.isClosed()) { throw new MockConnectionClosedException(); } } }
731732733734735736737738739740
return null; } public PreparedStatement prepareStatement(String sql) throws SQLException { if (isClosed()) { throw new MockConnectionClosedException(); } return this.getDriver().createMockPreparedStatement(this, sql); }
5253545556575859606162
stmt.setString(1, "xx"); MockConnection mockConn = conn.unwrap(MockConnection.class); mockConn.close(); MockConnectionClosedException error = null; try { stmt.execute(); } catch (MockConnectionClosedException ex) { error = ex; }
6263646566676869