Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8277932

Subject:callAs() not throwing NPE when action is null

XMLWordPrintable

        It's observed that the Subject:callAs() method does not throw NPE as per spec.

        The spec mentions that : "Throws:
        NullPointerException - if action is null"

         For the piece of code : Subject.callAs(new Subject(),null);

        expected : NullPointerException.
        Actual behavior is : "java.util.concurrent.CompletionException" thrown instead.

              weijun Weijun Wang
              kganapureddy Krushnareddy Ganapureddy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: