sruehl commented on a change in pull request #8: cleanup warnings in plc4j-api,
plc4j-core, dummy-driver
URL: https://github.com/apache/incubator-plc4x/pull/8#discussion_r170833118
##########
File path:
plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/specific/TypeSafePlcReadResponse.java
##########
@@ -84,7 +116,9 @@ public TypeSafePlcReadResponse(TypeSafePlcReadRequest<T>
request, List<ReadRespo
if (type == null) {
type = Object.class;
}
- return new TypeSafePlcReadResponse(new TypeSafePlcReadRequest(type,
plcReadResponse.getRequest()), responseItems);
+ // Warning: no validation that everything in the response is a T.
+ // Verified that everything in the response was the same type, but why
bother?
Review comment:
one of the contracts of TypeSafePlcReadResponse is that all values types
need to be of the same type.
`org/apache/plc4x/java/api/messages/specific/TypeSafePlcReadResponse.java:40`.
The for loop above is not a check, it's more a find my missing parameter
`Class class` ;)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services