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_r170832428
##########
File path:
plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/specific/TypeSafePlcReadResponse.java
##########
@@ -59,17 +59,49 @@ public TypeSafePlcReadResponse(TypeSafePlcReadRequest<T>
request, List<ReadRespo
return (Optional<ReadResponseItem<T>>) super.getResponseItem();
}
+ /**
+ * Cast or convert a PlcReadResponse to a TypeSafePlcReadReadResponse<T>.
+ *
+ * WARNING: this is inherently a non-type-safe operation. It was
introduced
+ * to serve the implementation of
PlcReader.read(TypeSafePlcReadRequest<T>).
+ * Additional use of it is not recommended. This interface is subject to
change.
+ *
+ * @param plcReadResponse the response implicitly with items of type T
+ * @return TypeSafePlcReadReadResponse<T>
+ */
@SuppressWarnings("unchecked")
public static <T> TypeSafePlcReadResponse<T> of(PlcReadResponse
plcReadResponse) {
Review comment:
fair Point, we would need a type Parameter `Class clazz` here.
----------------------------------------------------------------
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