PreparedStatementTest.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:dremio-oss 作者:
/** Tests that "not supported" has priority over possible "type not supported"
 *  check. */
@Test( expected = SQLFeatureNotSupportedException.class )
public void testParamSettingWhenUnsupportedTypeSaysUnsupported() throws SQLException {
  try(PreparedStatement prepStmt = connection.prepareStatement( "VALUES 1" )) {
    try {
      prepStmt.setClob(2, (Clob) null);
    } catch (final SQLFeatureNotSupportedException e) {
      assertThat(
          "Check whether params.-unsupported wording changed or checks changed.",
          e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER
      );
      throw e;
    }
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号