Skip to content

Commit aa5ef7e

Browse files
Update core/src/main/java/com/google/adk/tools/internal/ToolConstraints.java
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 92642aa commit aa5ef7e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/src/main/java/com/google/adk/tools/internal/ToolConstraints.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ private static List<BaseAgent> subAgentsCompat(LlmAgent agent) {
123123
Object result = mh.invoke(agent);
124124
if (result instanceof List<?>) {
125125
List<?> raw = (List<?>) result;
126-
List<BaseAgent> safe =
127-
raw.stream().filter(e -> e instanceof BaseAgent).map(e -> (BaseAgent) e).toList();
128-
return new ArrayList<>(safe);
126+
return raw.stream().filter(e -> e instanceof BaseAgent).map(e -> (BaseAgent) e).toList();
129127
}
130128
} catch (Throwable ignore) {
131129
// try next

0 commit comments

Comments
 (0)