javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-1141

Specify that all parts of a resource identifier must not have "/".

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1
    • Fix Version/s: 2.2 Sprint 14
    • Component/s: Resources
    • Labels:
      None

      Description

      A test for JAVASERVERFACES-2401 asserts that the following is valid:

      resourceHandler.createResource("css/images/background.png")

      This is not valid and should never have been valid.

      JSF 2.2 does add a new method resourceHandler.createViewResource() but that is intended to resolve facelet files, and those may have slashes in the path name.

        Issue Links

          Activity

          Ed Burns created issue -
          Ed Burns made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Ed Burns made changes -
          Link This issue blocks JAVASERVERFACES-2401 [ JAVASERVERFACES-2401 ]
          Ed Burns logged work - 01/Nov/12 9:53 PM
          • Time Spent:
            15 minutes
             
            M requestProcessingLifecycle.fm
            M preface.fm

            - In section 2.6.1.3, specify that *all* parts of a resource identifier
              are subject to the same constraints. For the purposes of this issue,
              this means no "/" in any part of the resource identifier.
            Sending preface.fm
            Sending requestProcessingLifecycle.fm
            Transmitting file data ..
            Committed revision 1072.
          Ed Burns made changes -
          Remaining Estimate 50 minutes [ 3000 ] 35 minutes [ 2100 ]
          Time Spent 15 minutes [ 900 ]
          Ed Burns logged work - 01/Nov/12 9:58 PM
          • Time Spent:
            10 minutes
             
            SECTION: Modified Files
            ----------------------------

            M requestProcessingLifecycle.fm
            M preface.fm

            - In section 2.6.1.3, specify that *all* parts of a resource identifier
              are subject to the same constraints. For the purposes of this issue,
              this means no "/" in any part of the resource identifier.

            M test/agnostic/resource/basic/src/test/java/com/sun/faces/test/agnostic/resource/Issue2401IT.java
            M test/agnostic/resource/basic/src/main/java/com/sun/faces/test/agnostic/resource/ResourceBean.java
            M test/agnostic/resource/basic/src/main/webapp/start.xhtml

            - Remove the errant test content.
            Sending test/agnostic/resource/basic/src/main/java/com/sun/faces/test/agnostic/resource/ResourceBean.java
            Sending test/agnostic/resource/basic/src/main/webapp/start.xhtml
            Sending test/agnostic/resource/basic/src/test/java/com/sun/faces/test/agnostic/resource/Issue2401IT.java
            Transmitting file data ...
            Committed revision 10959.
          Ed Burns made changes -
          Remaining Estimate 35 minutes [ 2100 ] 25 minutes [ 1500 ]
          Time Spent 15 minutes [ 900 ] 25 minutes [ 1500 ]
          Ed Burns made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 2.2 Sprint 14 [ 15353 ]
          Resolution Fixed [ 1 ]
          Hide
          Ed Burns added a comment -

          Re-opening per Leonardo Uribe's 20121103-1254 email.

          Show
          Ed Burns added a comment - Re-opening per Leonardo Uribe's 20121103-1254 email.
          Ed Burns made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          Ed Burns added a comment -

          Consider this EG email text from < http://java.net/projects/javaserverfaces-spec-public/lists/jsr344-experts/archive/2012-11/message/10 >.

          Leonardo, do you think it is sufficient to modify the javadoc for just
          ResourceHandler.createResource(String) to say that if the argument
          contains more than one slash, the text between the beginning of the
          string and that first slash must be taken as the libraryName, and the
          remainder must be used to find the resourceName?

          Show
          Ed Burns added a comment - Consider this EG email text from < http://java.net/projects/javaserverfaces-spec-public/lists/jsr344-experts/archive/2012-11/message/10 >. Leonardo, do you think it is sufficient to modify the javadoc for just ResourceHandler.createResource(String) to say that if the argument contains more than one slash, the text between the beginning of the string and that first slash must be taken as the libraryName, and the remainder must be used to find the resourceName?
          Ed Burns logged work - 14/Nov/12 3:11 AM
          • Time Spent:
            15 minutes
             
            M jsf-api/src/main/java/javax/faces/application/ResourceHandler.java

            - Added this text to createResource(string)

              For historical reasons, this method operate correctly when the
              argument resourceName is of the form libraryName/resourceName, even
              when resourceName contains '/' characters.
            Sending jsf-api/src/main/java/javax/faces/application/ResourceHandler.java
            Transmitting file data .
            Committed revision 11001.
          Ed Burns made changes -
          Remaining Estimate 25 minutes [ 1500 ] 10 minutes [ 600 ]
          Time Spent 25 minutes [ 1500 ] 40 minutes [ 2400 ]
          Ed Burns made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Ed Burns made changes -

            People

            • Assignee:
              Ed Burns
              Reporter:
              Ed Burns
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 50 minutes
                50m
                Remaining:
                Time Spent - 40 minutes Remaining Estimate - 10 minutes
                10m
                Logged:
                Time Spent - 40 minutes Remaining Estimate - 10 minutes
                40m