[
https://issues.apache.org/jira/browse/CAMEL-24541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-24541 started by Andrea Cosentino.
------------------------------------------------
> camel-djl: ImageNetUtil.getSynsetName can throw
> ArrayIndexOutOfBoundsException on synset lines without a space
> --------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24541
> URL: https://issues.apache.org/jira/browse/CAMEL-24541
> Project: Camel
> Issue Type: Bug
> Components: camel-ai
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.23.0
>
>
> camel-djl ImageNetUtil (line 40) parses each synset line with .split(" ",
> 2)[1], assuming every line contains a space separating the class id from the
> human-readable label. A synset file whose line has no space (a bare id, a
> trailing blank line, or a malformed entry) makes split return a
> single-element array, so [1] throws ArrayIndexOutOfBoundsException while
> loading the model labels. Fix: guard on the split length and fall back to the
> raw token (or skip the line) when there is no space.
> _Claude Code on behalf of oscerd_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)