chrisdutz commented on code in PR #2674:
URL: https://github.com/apache/plc4x/pull/2674#discussion_r3744400301
##########
plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/base/EipTcpConnection.java:
##########
@@ -278,11 +278,21 @@ private CompletableFuture<Void> probeAttributes() {
});
}
- private CompletableFuture<Void> checkAttributesSingle() {
+ private CipService getCipService(EipPacket response) {
Review Comment:
A simple getCipService would make me expect that it simply gets the CIP
service ... here the method is actually extracting something if a very specific
data-case is present or doesn't do anything if that's not the case.
Are we using this or could we use this in different places?
In the past we used a lot of "return null" methods and are more and more
trying to use Optionals in Java ... I tink renaming it to something that
indicates the fact that it's not just blindly accessing something, possibly
something like:
```
Optional<CipService> extractCipService(EipPacket response)
```
Might not hide this detail?
--
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]