Name: sdR10048 Date: 2003-08-28
Javadoc DOES specify the expected null reaction.
No exception should be thrown.
But code does throw NPE. See demo.
Minimized test:
===============
------- T.java -------
import javax.sql.rowset.*;
import javax.sql.*;
public class T {
public static void main(String[] args) {
MyBaseRowSet rs = new MyBaseRowSet();
try {
rs.setUrl(null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
class MyBaseRowSet extends BaseRowSet {
public MyBaseRowSet() {
super();
}
public void initParams() {
super.initParams();
}
public void notifyCursorMoved() {
super.notifyCursorMoved();
}
public void notifyRowChanged() {
super.notifyRowChanged();
}
public void notifyRowSetChanged() {
super.notifyRowSetChanged();
}
}
------- end-of-T.java -------
Minimized test output:
======================
java.lang.NullPointerException
at javax.sql.rowset.BaseRowSet.setUrl(BaseRowSet.java:613)
at T.main(T.java:9)
Failing Test [s] :
api/javax_sql/rowset/BaseRowSet/index.html#Options1[BaseRowSet0003]