anygeorge / java-google-safe-browsing

Automatically exported from code.google.com/p/java-google-safe-browsing
0 stars 0 forks source link

Shared Result Set #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Update the DB many times
2. Look up for infected Domains
3. SQL Error "on empty result set"

What is the expected output? What do you see instead?
- Should lookup without error

What version of the product are you using? On what operating system?
- the first one?

It seems that the problem occurs in GSBAnalizer Line 179 where the result set 
rs.getString("Hostkey") is called. In the same loop, there is a second sqlQuery 
sometimes overwriting this result set. 
I solved this problem by creating a second ResultSet rs2 and a second Statement 
stmt2. In the second sqlQuery (around Line 199) i used rs2 and stmt2 instead of 
rs and stmt. 

Original issue reported on code.google.com by Melchior...@gmail.com on 8 Nov 2012 at 10:06