Velocity
  1. Velocity
  2. VELOCITY-120

search paths ignored when checking timestamps

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3-rc1
    • Fix Version/s: 1.4
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other

      Description

      We have arranged to use the search paths to allow overrides to be made without
      changing the original versions of the templates. However, when we turn on
      Velocity caching, the search paths are ignored so long as the file is not
      modified. The problem is relativley easy to solve in FileResourceLoader.java;
      I'll attach patches next.

        Activity

        Ed Korthof created issue -
        Hide
        Ed Korthof added a comment -

        Created an attachment (id=4295)
        relatively minimal patch to org.apache.velocity.runtime.resource.loader.FileResourceLoader.isSourceModified() to look at the search path as well to see if the file has appeared earlier in the search path (no other functions have been changed)

        Show
        Ed Korthof added a comment - Created an attachment (id=4295) relatively minimal patch to org.apache.velocity.runtime.resource.loader.FileResourceLoader.isSourceModified() to look at the search path as well to see if the file has appeared earlier in the search path (no other functions have been changed)
        Hide
        Jon Stevens added a comment -

        patch applied

        ed, next time, please submit diffs against cvs head. I had to apply your patch
        by hand.

        Show
        Jon Stevens added a comment - patch applied ed, next time, please submit diffs against cvs head. I had to apply your patch by hand.
        Hide
        Ed Korthof added a comment -

        Thanks!

        I meant to include a second patch for HEAD (that was indeed intended for the
        VELOCITY_1_3 branch). For HEAD, I was hoping to include more centralization of
        logic (so that there's only one function for mapping a file name to a full path
        out of the search paths) – I haven't finished testing my changes for that
        though. Anyway, that can happen outside this issue.

        Show
        Ed Korthof added a comment - Thanks! I meant to include a second patch for HEAD (that was indeed intended for the VELOCITY_1_3 branch). For HEAD, I was hoping to include more centralization of logic (so that there's only one function for mapping a file name to a full path out of the search paths) – I haven't finished testing my changes for that though. Anyway, that can happen outside this issue.
        Hide
        Daniel Rall added a comment -

        I've backported this fix into the Velocity 1.3 branch.

        Show
        Daniel Rall added a comment - I've backported this fix into the Velocity 1.3 branch.
        Hide
        Will Glass-Husain added a comment -

        apparently this patch from last year has been applied, so I've closed the
        issue.

        Show
        Will Glass-Husain added a comment - apparently this patch from last year has been applied, so I've closed the issue.
        Hide
        Daniel Rall added a comment -

        Yes, this was applied to what was released as 1.4-rc1. It was also briefly in
        the 1.3 stream, but I believe that Geir rolled that change back to get out a
        patch release.

        Show
        Daniel Rall added a comment - Yes, this was applied to what was released as 1.4-rc1. It was also briefly in the 1.3 stream, but I believe that Geir rolled that change back to get out a patch release.
        Jeff Turner made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 15717 12314990
        Mark Thomas made changes -
        Workflow jira [ 12324995 ] Default workflow, editable Closed status [ 12551320 ]
        Mark Thomas made changes -
        Assignee Velocity-Dev List [ velocity-dev@jakarta.apache.org ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551320 ] jira [ 12552036 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Ed Korthof
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development