Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4187

ResourceHandler.createResource methods should throw NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.0-beta
    • 2.3.0, 2.2.15
    • JSR-372
    • None

    Description

      ResourceHandler.createResource methods should throw NPE.

      Looking at the JavaDoc for the ResourceHandler we need to throw an NPE when the resourceName is null:

      https://javaee.github.io/javaee-spec/javadocs/javax/faces/application/ResourceHandler.html#createResource-java.lang.String-

      https://javaee.github.io/javaee-spec/javadocs/javax/faces/application/ResourceHandler.html#createResource-java.lang.String-java.lang.String-

      https://javaee.github.io/javaee-spec/javadocs/javax/faces/application/ResourceHandler.html#createResource-java.lang.String-java.lang.String-java.lang.String-

      Throws:
      NullPointerException - if resourceName is null.

      Currently our behavior looks to just return null which is incorrect according to the specification.

      Attachments

        1. MYFACES-4187.patch
          2 kB
          Paul Nicolucci

        Issue Links

          Activity

            People

              paul.nicolucci Paul Nicolucci
              paul.nicolucci Paul Nicolucci
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: