Skip to content

Commit a357765

Browse files
hs-lsongclaude
andcommitted
Add parity test for filter chain optimization and fix unknown filter handling
The parity test ensures the optimized filter chain produces identical results to the unoptimized nested method approach across many scenarios including chained filters, named parameters, SafeString handling, and edge cases. Fixed a behavioral difference where unknown filters would pass through the original value in the optimized path but return empty in the unoptimized path. Now both paths return null for unknown filters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5877a05 commit a357765

2 files changed

Lines changed: 532 additions & 1 deletion

File tree

src/main/java/com/hubspot/jinjava/el/ext/AstFilterChain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public Object eval(Bindings bindings, ELContext context) {
8888
return null;
8989
}
9090
if (filter == null) {
91-
continue;
91+
return null;
9292
}
9393

9494
Object[] args = evaluateFilterArgs(spec, bindings, context);

0 commit comments

Comments
 (0)