Harmony
  1. Harmony
  2. HARMONY-2448

[classlib][beans] java.beans.VetoableChangeListenerProxy.vetoableChange() does not throw NPE

    Details

      Description

      VetoableChangeListenerProxy.vetoableChange() does not throw NPE if
      object was created with VetoableChangeListener listener == null. Specification does not mention this, but RI throws NPE.

        Activity

        Hide
        Kevin Zhou added a comment -

        I can not reproduce it any more on the latest version of HDK.

        Thanks

        Show
        Kevin Zhou added a comment - I can not reproduce it any more on the latest version of HDK. Thanks
        Hide
        Nikolay Kuznetsov added a comment -

        Attached test demonstrated this problem:
        Output on Harmony VM:
        getListener()=null
        FAIL: NullPointerExceptin is expected

        Output on BEA:
        getListener()=null
        PASS
        java.lang.NullPointerException
        at
        java.beans.VetoableChangeListenerProxy.vetoableChange(Ljava.beans.Pro
        pertyChangeEvent;)V(VetoableChangeListenerProxy.java:54)
        at test.main([Ljava.lang.String;)V(test.java:14)

        Show
        Nikolay Kuznetsov added a comment - Attached test demonstrated this problem: Output on Harmony VM: getListener()=null FAIL: NullPointerExceptin is expected Output on BEA: getListener()=null PASS java.lang.NullPointerException at java.beans.VetoableChangeListenerProxy.vetoableChange(Ljava.beans.Pro pertyChangeEvent;)V(VetoableChangeListenerProxy.java:54) at test.main([Ljava.lang.String;)V(test.java:14)

          People

          • Assignee:
            Kevin Zhou
            Reporter:
            Nikolay Kuznetsov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development