sruehl commented on a change in pull request #40: Alias registry for opm
URL: https://github.com/apache/incubator-plc4x/pull/40#discussion_r235885885
##########
File path:
plc4j/utils/opm/src/main/java/org/apache/plc4x/java/opm/PlcEntityInterceptor.java
##########
@@ -154,19 +163,25 @@ static void refetchAllFields(Object proxy,
PlcDriverManager driverManager, Strin
Arrays.stream(entityClass.getDeclaredFields())
.filter(field -> field.isAnnotationPresent(PlcField.class))
+ .filter(field -> needsToBeFetched(lastFetched, field))
.forEach(field ->
requestBuilder.addItem(
- field.getDeclaringClass().getName() + "." +
field.getName(),
- field.getAnnotation(PlcField.class).value()
+ getFqn(field),
+ OpmUtils.getOrResolveAddress(registry,
field.getAnnotation(PlcField.class).value())
)
);
PlcReadRequest request = requestBuilder.build();
+ LOGGER.trace("Request for refetch of " + entityClass + " was build
and is " + request.toString());
Review comment:
string formatting see other comment.
----------------------------------------------------------------
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