This is an automated email from the ASF dual-hosted git repository. sruehl pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
commit 865fc9e73f6f3f227a0b99776c1ad46b03af29a3 Author: Sebastian Rühl <sru...@apache.org> AuthorDate: Wed Sep 26 11:56:51 2018 +0200 [General] fixed broken getAllByteArrays implementation --- .../apache/plc4x/java/base/messages/DefaultPlcReadResponse.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/DefaultPlcReadResponse.java b/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/DefaultPlcReadResponse.java index bc379e8..5cbaf0c 100644 --- a/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/DefaultPlcReadResponse.java +++ b/plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/messages/DefaultPlcReadResponse.java @@ -679,6 +679,15 @@ public class DefaultPlcReadResponse implements InternalPlcReadResponse { @Override public Collection<byte[]> getAllByteArrays(String name) { + FieldItem fieldInternal = getFieldInternal(name); + if (fieldInternal != null) { + int num = fieldInternal.getNumberOfValues(); + List<byte[]> values = new ArrayList<>(num); + for (int i = 0; i < num; i++) { + values.add(fieldInternal.getByteArray(i)); + } + return values; + } return null; }