Skip to content

Commit ca78043

Browse files
jasmith-hsclaude
andcommitted
feat: add boolean parameter to withUnwrapRawOverride
Callers sometimes need to temporarily set the unwrap raw override to false (not just true). Adding a parameter avoids forcing callers to work around the API by manually managing set/restore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6d5e180 commit ca78043

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/com/hubspot/jinjava/interpret/Context.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,11 +887,15 @@ public void setUnwrapRawOverride(boolean unwrapRawOverride) {
887887
}
888888

889889
public TemporaryValueClosable<Boolean> withUnwrapRawOverride() {
890+
return withUnwrapRawOverride(true);
891+
}
892+
893+
public TemporaryValueClosable<Boolean> withUnwrapRawOverride(boolean value) {
890894
TemporaryValueClosable<Boolean> temporaryValueClosable = new TemporaryValueClosable<>(
891895
isUnwrapRawOverride(),
892896
this::setUnwrapRawOverride
893897
);
894-
setUnwrapRawOverride(true);
898+
setUnwrapRawOverride(value);
895899
return temporaryValueClosable;
896900
}
897901

0 commit comments

Comments
 (0)