I am trying to move from Cobertura to jacoco and get huge branch coverage difference. Started to investigate it and..
Can someone explain what I am missing.
I have finally block in my code and it is:
} finally {
try {
if (rs != null) {
rs.close();
}
if (st != null) {
st.close();
}
if (con != null) {
con.close();
}
} catch (SQLException ex) {
ex.printStackTrace();
}
}
And on that jacoco report thinks that
if (rs != null) { >> 0/8 branches
rs.close(); >>0/12 branches
And so on. What are these 12 branches in rs.close() sentence? And in if I can get 2 (rs is NULL or isn't NULL)
Br,
Villu