This is an automated email from the ASF dual-hosted git repository. cdutz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
The following commit(s) were added to refs/heads/master by this push: new 2679bd6 Fixed some strange code of mine. 2679bd6 is described below commit 2679bd6ff49134335eb11f5475ae7969fbfeed9f Author: Christofer Dutz <christofer.d...@c-ware.de> AuthorDate: Mon Feb 19 11:02:21 2018 +0100 Fixed some strange code of mine. --- .../java/org/apache/plc4x/java/isotp/netty/model/types/TpduSize.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/isotp/netty/model/types/TpduSize.java b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/isotp/netty/model/types/TpduSize.java index 836da8b..8cdd3b7 100644 --- a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/isotp/netty/model/types/TpduSize.java +++ b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/isotp/netty/model/types/TpduSize.java @@ -49,10 +49,9 @@ public enum TpduSize { } public static TpduSize valueForGivenSize(int pduSize) { - if(pduSize < 0) { + if(pduSize <= 0) { throw new IllegalArgumentException("PduSize has to be greater than 0"); } - assert pduSize > 0; for (TpduSize tpduSize : values()) { if(tpduSize.getValue() >= pduSize) { return tpduSize; -- To stop receiving notification emails like this one, please contact cd...@apache.org.