MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-1176

XmlTemplate fails when filename contains spaces on WindowsXP

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.7-SNAPSHOT
    • Fix Version/s: 1.1.7
    • Component/s: XmlTemplate
    • Labels:
      None
    • Environment:
      Windows XP SP2

      Description

      XmlTemplate uses URLs. From this it extracts the filename and uses this to load a file. WindowsXP at least doesn't understand the %20 encoding for spaces in a filename. Attached patch replaces instances of %20 in URL filepath with " " in filepath use to open file.

      1. XmlTemplateTest-508758-patch.txt
        2 kB
        Jayson Raymond
      2. XmlTemplate-472727-patch.txt
        1 kB
        Jayson Raymond

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        41d 17h 2m 1 Leonardo Uribe 26/Feb/08 21:29
        Leonardo Uribe made changes -
        Fix Version/s 1.1.7 [ 12313398 ]
        Fix Version/s 1.1.7-SNAPSHOT [ 12312361 ]
        Leonardo Uribe made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Leonardo Uribe added a comment -

        fixed at revision 631391

        Show
        Leonardo Uribe added a comment - fixed at revision 631391
        Hide
        Leonardo Uribe added a comment -

        The patch works but it has several drawbacks

        Better is use

        new FileInputStream(new File(URI.create(url.toString())))

        on every call to a file instead. This solution was tested on windows and works well.

        Show
        Leonardo Uribe added a comment - The patch works but it has several drawbacks Better is use new FileInputStream(new File(URI.create(url.toString()))) on every call to a file instead. This solution was tested on windows and works well.
        Leonardo Uribe made changes -
        Assignee Leonardo Uribe [ lu4242 ]
        Jayson Raymond made changes -
        Attachment XmlTemplateTest-508758-patch.txt [ 12373234 ]
        Hide
        Jayson Raymond added a comment -

        Patches so XmlTemplateTest can use pathnames with spaces.

        Show
        Jayson Raymond added a comment - Patches so XmlTemplateTest can use pathnames with spaces.
        Jayson Raymond made changes -
        Field Original Value New Value
        Attachment XmlTemplate-472727-patch.txt [ 12373233 ]
        Hide
        Jayson Raymond added a comment -

        Patch for XmlTemplate to handle filenames with spaces.

        Show
        Jayson Raymond added a comment - Patch for XmlTemplate to handle filenames with spaces.
        Jayson Raymond created issue -

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Jayson Raymond
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development