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


The following commit(s) were added to refs/heads/master by this push:
     new 183b51d  fixed missing MAX_VALUE support
183b51d is described below

commit 183b51d36ef3073c04388ab6eb58ca472df14185
Author: Sebastian Rühl <sru...@apache.org>
AuthorDate: Thu Feb 22 10:24:06 2018 +0100

    fixed missing MAX_VALUE support
---
 .../ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
index e7d5bbe..d211e18 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
@@ -49,7 +49,7 @@ public class ByteValue implements ByteReadable {
 
     public static void checkUnsignedBounds(BigInteger value, int 
numberOfBytes) {
         BigInteger upperBound = BigInteger.valueOf(2).pow(8 * numberOfBytes);
-        if (value.compareTo(BigInteger.ZERO) < 0 || 
value.compareTo(upperBound) > 0) {
+        if (value.compareTo(BigInteger.ZERO) < 0 || 
value.compareTo(upperBound) >= 0) {
             throw new IllegalArgumentException("Value must between 0 and " + 
upperBound + ". Was " + value);
         }
     }

-- 
To stop receiving notification emails like this one, please contact
sru...@apache.org.

Reply via email to