JoelGaechter commented on issue #1947:
URL: https://github.com/apache/plc4x/issues/1947#issuecomment-2559575818
As off right now, these fields are se using the fallback behavior of
`PlcEntityInterceptor::getTyped`:
```java
Object responseObject = response.getObject(sourceFieldName);
if (clazz.isAssignableFrom(responseObject.getClass())) {
return responseObject;
}
```
The preferrable option would be to call the respective
`PlcReadResponse::getAll...` instead of `PlcReadResponse::getObject` if the
field type is a collection (or array). For this, the generic type might need to
be determined though. While for arrays, this can be done using
`Class::getComponentType`, for collections, `TypeToken` might be the way to go.
Additionally, if specific collection types should be supported, further
processing might be needed as `PlcReadResponse::getAll...` returns a generic
`Collection`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]