Skip to content

Commit 56adb2a

Browse files
ivicacclaude
andcommitted
4754 Fix SpotBugs warnings in FromAi and FromAiResult
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b749526 commit 56adb2a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

server/libs/ai/ai-tool-api/src/main/java/com/bytechef/ai/tool/FromAi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ public TypedValue execute(EvaluationContext context, Object target, Object... ar
114114
throw new IllegalArgumentException("fromAi 'required' in map must be a boolean.");
115115
}
116116

117-
if (requiredArg instanceof Boolean requiredBool) {
118-
required = requiredBool;
117+
if (requiredArg != null) {
118+
required = (Boolean) requiredArg;
119119
}
120120
}
121121
}

server/libs/ai/ai-tool-api/src/main/java/com/bytechef/ai/tool/FromAiResult.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,7 @@ public record FromAiResult(
3636
public FromAiResult {
3737
Objects.requireNonNull(name, "name must not be null");
3838
Objects.requireNonNull(type, "type must not be null");
39+
40+
options = options == null ? null : List.copyOf(options);
3941
}
4042
}

0 commit comments

Comments
 (0)