-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
rc
-
sparc
-
solaris_2.6
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2074020 | 5.0 | Lance Andersen | P3 | Closed | Fixed | rc |
JDK-2074019 | 1.0 | Lance Andersen | P3 | Closed | Fixed | 1.0 |
Name: sdR10048 Date: 08/28/2003
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b16"
JCK : 1.5
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] :
api/javax_sql/rowset/BaseRowSet/index.html#Listen[BaseRowSet2037]
api/javax_sql/rowset/BaseRowSet/index.html#Listen[BaseRowSet2038]
api/javax_sql/rowset/BaseRowSet/index.html#Listen[BaseRowSet2039]
api/javax_sql/rowset/BaseRowSet/index.html#Listen[BaseRowSet2040]
Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
...
protected void notifyCursorMoved()
Notifies all of the listeners registered with this
RowSet object that its cursor has moved.
When an application calls a method to move the cursor,
that method moves the cursor and then calls this method
internally. An application never invokes this method directly.
...
---------- end-of-excerpt ---------------
Problem description
===================
The methods:
javax.sql.rowset.BaseRowSet.notifyCursorMoved
javax.sql.rowset.BaseRowSet.notifyRowChanged
javax.sql.rowset.BaseRowSet.notifyRowSetChanged
throw ClassCastException if registered listeners list is not empty.
Minimized test:
===============
------- T.java -------
import javax.sql.rowset.*;
import javax.sql.*;
public class T {
public static void main(String[] args) {
MyBaseRowSet rs = new MyBaseRowSet();
rs.addRowSetListener(new FakeRSAdapter());
rs.notifyCursorMoved();
}
}
class MyBaseRowSet extends BaseRowSet {
public MyBaseRowSet() {
super();
}
public void initParams() {
super.initParams();
}
public void notifyCursorMoved() {
super.notifyCursorMoved();
}
public void notifyRowChanged() {
G super.notifyRowChanged();
}
public void notifyRowSetChanged() {
super.notifyRowSetChanged();
}
}
class FakeRSAdapter implements RowSetListener {
public void cursorMoved(RowSetEvent e) {
}
public void rowChanged(RowSetEvent e) {
}
public void rowSetChanged(RowSetEvent e) {
}
}
------- end-of-T.java -------
Minimized test output:
======================
C:\TEMP\5>c:\java\bin\java T
Exception in thread "main" java.lang.ClassCastException: MyBaseRowSet
at javax.sql.rowset.BaseRowSet.notifyCursorMoved(BaseRowSet.java:479)
at MyBaseRowSet.notifyCursorMoved(T.java:24)
at T.main(T.java:9)
JCK test source location:
==========================
At this time (28 aug 2003) these testcases aren't in JCK15 ws yet.
======================================================================
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b16"
JCK : 1.5
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] :
api/javax_sql/rowset/BaseRowSet/index.html#Listen[BaseRowSet2037]
api/javax_sql/rowset/BaseRowSet/index.html#Listen[BaseRowSet2038]
api/javax_sql/rowset/BaseRowSet/index.html#Listen[BaseRowSet2039]
api/javax_sql/rowset/BaseRowSet/index.html#Listen[BaseRowSet2040]
Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
...
protected void notifyCursorMoved()
Notifies all of the listeners registered with this
RowSet object that its cursor has moved.
When an application calls a method to move the cursor,
that method moves the cursor and then calls this method
internally. An application never invokes this method directly.
...
---------- end-of-excerpt ---------------
Problem description
===================
The methods:
javax.sql.rowset.BaseRowSet.notifyCursorMoved
javax.sql.rowset.BaseRowSet.notifyRowChanged
javax.sql.rowset.BaseRowSet.notifyRowSetChanged
throw ClassCastException if registered listeners list is not empty.
Minimized test:
===============
------- T.java -------
import javax.sql.rowset.*;
import javax.sql.*;
public class T {
public static void main(String[] args) {
MyBaseRowSet rs = new MyBaseRowSet();
rs.addRowSetListener(new FakeRSAdapter());
rs.notifyCursorMoved();
}
}
class MyBaseRowSet extends BaseRowSet {
public MyBaseRowSet() {
super();
}
public void initParams() {
super.initParams();
}
public void notifyCursorMoved() {
super.notifyCursorMoved();
}
public void notifyRowChanged() {
G super.notifyRowChanged();
}
public void notifyRowSetChanged() {
super.notifyRowSetChanged();
}
}
class FakeRSAdapter implements RowSetListener {
public void cursorMoved(RowSetEvent e) {
}
public void rowChanged(RowSetEvent e) {
}
public void rowSetChanged(RowSetEvent e) {
}
}
------- end-of-T.java -------
Minimized test output:
======================
C:\TEMP\5>c:\java\bin\java T
Exception in thread "main" java.lang.ClassCastException: MyBaseRowSet
at javax.sql.rowset.BaseRowSet.notifyCursorMoved(BaseRowSet.java:479)
at MyBaseRowSet.notifyCursorMoved(T.java:24)
at T.main(T.java:9)
JCK test source location:
==========================
At this time (28 aug 2003) these testcases aren't in JCK15 ws yet.
======================================================================
- backported by
-
JDK-2074019 javax.sql.rowset.BaseRowSet.notifyXXX throw ClassCastException
-
- Closed
-
-
JDK-2074020 javax.sql.rowset.BaseRowSet.notifyXXX throw ClassCastException
-
- Closed
-