Claus Ibsen created CAMEL-26176:
-----------------------------------

             Summary: camel-olingo4 - with filterAlreadySeen a complex or 
collection value becomes a List, empty on the next call
                 Key: CAMEL-26176
                 URL: https://issues.apache.org/jira/browse/CAMEL-26176
             Project: Camel
          Issue Type: Bug
          Components: camel-olingo4
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of olingo4 (CAMEL-24961, PR #28412).

h4. 1. filterAlreadySeen turns a complex or collection value into a List, empty 
the second time

{{Olingo4Index.filterResponse}} (main 2a465aa4814c, lines 124-125) treats any 
{{Iterable}} as a list of results. A {{ClientComplexValue}} is an 
{{Iterable<ClientProperty>}}, so with {{filterAlreadySeen=true}} a read of a 
complex property returns an {{ArrayList}} of {{ClientProperty}} instead of the 
value, and an empty list on the next call because every property was already 
seen. A {{ClientCollectionValue}} becomes a plain {{List}}. This happens in the 
producer ({{Olingo4Producer}} line 63) and the consumer ({{Olingo4Consumer}} 
line 70), and {{index}} (line 113) has the same branch. Checked on 
4.24.0-SNAPSHOT with the module's WireMock replay.

Proposed: only split {{ClientEntitySet}}, {{java.util.Collection}} and arrays, 
and index the other Olingo values ({{ClientValue}}) as one result.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to