Skip to content

fix: use instance Velocity engine for appended resources - #306

Open
efegokdemir wants to merge 1 commit into
apache:masterfrom
efegokdemir:fix/269-instance-velocity
Open

efegokdemir wants to merge 1 commit into
apache:masterfrom
efegokdemir:fix/269-instance-velocity

Conversation

@efegokdemir

Copy link
Copy Markdown

Fixes #269

Summary

Use the per-execution VelocityEngine when rendering appended .vm resources instead of the process-wide static Velocity singleton. This keeps the appended-resource path consistent with normal bundle rendering and avoids shared global state in the thread-safe mojos.

Changes

  • Replace static Velocity.init/Velocity.evaluate calls with the configured instance engine.
  • Add coverage for filtering an appended .vm resource.

Testing

  • mvn -Dspotless.check.skip=true -Dspotless.apply.skip=true test — passed, 12 tests.
  • git diff --check — passed.
  • Checkstyle and RAT — passed.

The repository Spotless check is blocked locally by the installed JDK and the bundled palantir-java-format (NoSuchFieldError in JCTree$JCCompilationUnit).

Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Static Velocity singleton used in threadSafe=true mojo (parallel-build hazard)

1 participant