Velocity
  1. Velocity
  2. VELOCITY-713

FileResourceLoader does not conform to its spec

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Checked in source code of HEAD

      Description

      The JavaDoc for org.apache.velocity.runtime.resource.loader.FileResourceLoader says:
      ' A loader for templates stored on the file system. Treats the template
      as relative to the configured root path. If the root path is empty
      treats the template name as an absolute path.'

      The functionality of trying to resolve name as absolute path in case no root paths are configured is not implemented. Additionally, I suggest implementing new feature - a kind of configuration flag 'useAsAbsolutePath' that would trigger resolving resource name as absolute path, no matter if additional roots for given loader were configured. Sorry for not putting it under separate JIRA issue, it's only my suggestion and it's related to the reported bug.

        Activity

        Dariusz Kordonski created issue -
        Dariusz Kordonski made changes -
        Field Original Value New Value
        Component/s Engine [ 12311337 ]
        Hide
        Will Glass-Husain added a comment -

        Dariusz –

        sorry for responding late to this old bug. Are you sure about this? There's a unit test on this. See AbsoluteFileResourceLoaderTestCase.

        Can you provide some sample code that should work but doesn't? If so, we can fix this.

        Show
        Will Glass-Husain added a comment - Dariusz – sorry for responding late to this old bug. Are you sure about this? There's a unit test on this. See AbsoluteFileResourceLoaderTestCase. Can you provide some sample code that should work but doesn't? If so, we can fix this.
        Mark Thomas made changes -
        Workflow jira [ 12455171 ] Default workflow, editable Closed status [ 12551633 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551633 ] jira [ 12552512 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Dariusz Kordonski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development