PreparedStatement insertlogstmt=null;try{......}catch(Exception e){.....}finally { try { if (insertlogstmt != null&&(!insertlogstmt.isClosed())) { ##it will return ,but why insertlogstmt.close(); } } catch (Exception e) { e.printStackTrace(); } try { if (m_conn != null&&!m_conn.isClosed()) { m_conn.close(); logger.debug("SynVoltdb Log logForvoltdb m_conn is not null and closed"); } } catch (SQLException sqle) { } }
调用 insertlogstmt.isClosed() 方法的时候,会跳出方法返回 后面的insertlogstmt.close(); 不会执行,这是什么情况??