src.samples.java.ex.SIL_Sample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fb-contrib Show documentation
Show all versions of fb-contrib Show documentation
An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.
package ex;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
@SuppressWarnings("all")
public class SIL_Sample {
public void test(ResultSet rs) throws SQLException {
Connection c = rs.getStatement().getConnection();
PreparedStatement ps = c.prepareStatement("select foo from boo where moo = ?");
while (rs.next()) {
int key = rs.getInt(1);
ps.setInt(1, key);
ResultSet mrs = ps.executeQuery();
}
}
}