
import java.sql.ResultSet;
import java.sql.SQLException;

public class BadResultSetAccessTest
{

	public void test1( ResultSet rs ) throws SQLException
	{
		int i = rs.getInt(0);
		i++;
		rs.updateInt(0, i );
	}
	
	public void test2( ResultSet rs ) throws SQLException
	{
		String s = rs.getString(0);
		s = s.substring(1);
		rs.updateString(0, s );
	}
	
	public void test3( ResultSet rs ) throws SQLException
	{
		String s = rs.getString("foo");
		s = s.substring(1);
		rs.updateString("foo", s );
	}
}
Add new detector that looks for calls to ResultSet.getXXX and ResultSet.updateXXX where the field index specified is 0. - add test
Add new detector that looks for calls to ResultSet.getXXX and ResultSet.updateXXX where the field index specified is 0. - add test


git-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@2826 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3
