-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
beta
-
sparc
-
solaris_2.5
Name: sdC67446 Date: 06/10/98
The spec for method
java.beans.beancontext.BeanContextServiceRevokedEvent(Class service)
says nothing about method's behavior when class instance was create with
serviceClass == null using constructor
BeanContextServiceRevokedEvent(BeanContextServices, null, false).
The doc says:
public boolean isServiceClass(Class service)
test service equality
Currently in this case isServiceClass throws undocumented
NullPointerException.
-----Here is the test demonstrating the bug:------
import java.beans.beancontext.*;
public class Test {
public static void main(String[] args) {
BeanContextServicesSupport bcss = new BeanContextServicesSupport();
BeanContextServiceRevokedEvent bcsre =
new BeanContextServiceRevokedEvent(bcss, null, false);
if (bcsre.getClass() != null) {
System.out.println("input param != null.");
}
bcsre.isServiceClass(bcsre.getClass());
}
}
-----Output from test:--------------------
input param != null.
Exception in thread "main" java.lang.NullPointerException
at java.beans.beancontext.BeanContextServiceRevokedEvent.isServiceClass(Compiled Code)
at Test.main(Compiled Code)
-------------------------------------------------
======================================================================