FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

README: fix API drift in resource-locator and function-registration examples by ZayanKhan-12 · Pull Request #1331 · HubSpot/jinjava · GitHub

README: fix API drift in resource-locator and function-registration examples - #1331

Open
ZayanKhan-12 wants to merge 4 commits into
HubSpot:masterfrom
ZayanKhan-12:fix/readme-api-drift
Open

README: fix API drift in resource-locator and function-registration examples#1331
ZayanKhan-12 wants to merge 4 commits into
HubSpot:masterfrom
ZayanKhan-12:fix/readme-api-drift

Conversation

ZayanKhan-12 commented Jul 26, 2026
edited
Loading

Copy link
Copy Markdown

Four fixes to README examples that don't match the current API, one commit each:

  1. ResourceLoader → ResourceLocator — no ResourceLoader type exists in jinjava; the interface to implement is com.hubspot.jinjava.loader.ResourceLocator (the rest of the section already uses the correct name).
  2. FileResourceLocator → FileLocator — the file-system locator class is com.hubspot.jinjava.loader.FileLocator; FileResourceLocator doesn't exist anywhere in the tree.
  3. Non-compiling multi-locator example — Jinjava.setResourceLocator(ResourceLocator) takes a single argument (Jinjava.java), but the example passed two. Now wraps them in CascadingResourceLocator (varargs constructor), which is exactly what the surrounding text describes.
  4. Unbalanced parentheses in the registerFunction(new ELFunctionDefinition(...) example — two opening parens, one close.

Verification: every class/method name checked against src/main/java; full mvn test suite run locally on macOS arm64 with the JDK 21 toolchain: 2201 tests, 0 failures, 0 errors (23 skipped), BUILD SUCCESS.

Prepared with AI assistance (Claude); all claims verified against the source as described.

zk-khan and others added 4 commits July 26, 2026 19:45
There is no ResourceLoader type in jinjava; the interface to implement
is com.hubspot.jinjava.loader.ResourceLocator (as the rest of the
section already says).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The file-system locator class is
com.hubspot.jinjava.loader.FileLocator; no FileResourceLocator exists.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Jinjava.setResourceLocator takes a single ResourceLocator; the example
passed two. Wrap them in CascadingResourceLocator (varargs constructor),
which is what the surrounding text describes, and use the real
FileLocator class name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The call opens two parens (registerFunction( and new
ELFunctionDefinition() but closed only one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL