Skip to content

Commit 43fb172

Browse files
hs-lsongclaude
andcommitted
fix: Suppress method hiding warning on instance() method
The static instance() method intentionally hides the parent class method to return the correct singleton for this execution mode, matching the pattern used in NonRevertingEagerExecutionMode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 270634b commit 43fb172

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/hubspot/jinjava/mode/PreserveUndefinedExecutionMode.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.hubspot.jinjava.interpret.Context;
44
import com.hubspot.jinjava.interpret.DeferredValue;
55
import com.hubspot.jinjava.lib.expression.PreserveUndefinedExpressionStrategy;
6+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
67

78
/**
89
* An execution mode that preserves unknown/undefined variables as their original template syntax
@@ -31,6 +32,10 @@ public class PreserveUndefinedExecutionMode extends EagerExecutionMode {
3132

3233
protected PreserveUndefinedExecutionMode() {}
3334

35+
@SuppressFBWarnings(
36+
value = "HSM_HIDING_METHOD",
37+
justification = "Purposefully overriding to return static instance of this class."
38+
)
3439
public static ExecutionMode instance() {
3540
return INSTANCE;
3641
}

0 commit comments

Comments
 (0)