javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2543

ExternalContext.getResource() does not throw NPE when path is null.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.14, 2.2.0-m06
    • Component/s: context
    • Labels:
      None
    • Environment:

      N/A

      Description

      Mojarra API's for ExternalContext.getResource() states that a NulPointerException should be thrown if path is null.

      Right now no no exception is throw at all.

      If you pass in null you get null in return.

      According to the ServletContext.getResource() API's it states the following:

      Returns:
      the resource located at the named path, or null if there is no resource at that path
      Throws:
      java.net.MalformedURLException - if the pathname is not given in the correct form

        Activity

        Hide
        rogerk added a comment -

        Changes

        Show
        rogerk added a comment - Changes
        Hide
        rogerk added a comment -

        Committed to trunk:
        Committed revision 10867.

        Show
        rogerk added a comment - Committed to trunk: Committed revision 10867.
        Hide
        rogerk added a comment -

        Commited to MOJARAA_2_1X_ROLLING:
        Sending jsf-ri/src/main/java/com/sun/faces/context/ExternalContextImpl.java
        Sending test/agnostic/context/regular/src/main/java/com/sun/faces/test/agnostic/context/regular/ExternalContextBean.java
        Adding test/agnostic/context/regular/src/main/webapp/issue2543.xhtml
        Sending test/agnostic/context/regular/src/test/java/com/sun/faces/test/agnostic/context/regular/ExternalContextIT.java
        Transmitting file data ....
        Committed revision 10868.

        Show
        rogerk added a comment - Commited to MOJARAA_2_1X_ROLLING: Sending jsf-ri/src/main/java/com/sun/faces/context/ExternalContextImpl.java Sending test/agnostic/context/regular/src/main/java/com/sun/faces/test/agnostic/context/regular/ExternalContextBean.java Adding test/agnostic/context/regular/src/main/webapp/issue2543.xhtml Sending test/agnostic/context/regular/src/test/java/com/sun/faces/test/agnostic/context/regular/ExternalContextIT.java Transmitting file data .... Committed revision 10868.
        Hide
        rogerk added a comment -

        Committed.

        Show
        rogerk added a comment - Committed.

          People

          • Assignee:
            rogerk
            Reporter:
            dougd
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: