Closed AnatoliyYakimov closed 1 year ago
@AnatoliyYakimov Thanks for the report.
To confirm, with the current code, this seems to happen when the actual ResultSet#next()
throws an exception.
Is this the scenario in your case?
I think that's the reason. In logs we didn't see exception from ResultSet#next()
because NPE were thrown from finally
clause. I will try to reproduce this situation.
I've created pull request that fix this issue #23
Hi. We get NPE while executing query with Spring JdbcTemplate.
NPE is here: .DataSourceObservationListener.handleResultSetNext
Variable hasNext:
And MethodExecutionContext is building like this:
I think that if
throws an error, then variable
result
is null and we getting this NPE.Solution will be to modify condition in if statement to avoid Boolean unboxing which causing NPE: