You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/02/02 10:43:44 UTC
[incubator-plc4x] branch feature/Beckhoff_ADS_protocol updated: use
long literal instead of value of
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch feature/Beckhoff_ADS_protocol
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
The following commit(s) were added to refs/heads/feature/Beckhoff_ADS_protocol by this push:
new 90ecd7c use long literal instead of value of
90ecd7c is described below
commit 90ecd7ccf8b50163706c69f7d976420d4907c9e2
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Feb 2 11:43:40 2018 +0100
use long literal instead of value of
---
.../java/org/apache/plc4x/java/ads/api/commands/types/LengthTest.java | 2 +-
.../org/apache/plc4x/java/ads/api/commands/types/ReadLengthTest.java | 4 ++--
.../org/apache/plc4x/java/ads/api/commands/types/SampleSizeTest.java | 2 +-
.../org/apache/plc4x/java/ads/api/commands/types/SamplesTest.java | 2 +-
.../org/apache/plc4x/java/ads/api/commands/types/WriteLengthTest.java | 2 +-
.../org/apache/plc4x/java/ads/api/generic/types/DataLengthTest.java | 2 +-
.../java/org/apache/plc4x/java/ads/api/generic/types/LengthTest.java | 2 +-
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/LengthTest.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/LengthTest.java
index 26ca476..fe08e9a 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/LengthTest.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/LengthTest.java
@@ -37,7 +37,7 @@ class LengthTest {
assertByte(Length.of(1), "0x00000001");
assertByte(Length.of(65535), "0x0000ffff");
Assertions.assertThrows(IllegalArgumentException.class, () -> Length.of(-1));
- Assertions.assertThrows(IllegalArgumentException.class, () -> Length.of(Long.valueOf("4294967296")));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> Length.of(4294967296L));
}
@Test
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/ReadLengthTest.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/ReadLengthTest.java
index 1c93d05..d6693e9 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/ReadLengthTest.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/ReadLengthTest.java
@@ -22,7 +22,7 @@ import org.apache.commons.codec.binary.Hex;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-class ReadReadLengthTest {
+class ReadLengthTest {
byte NULL_BYTE = 0x0;
@Test
@@ -36,7 +36,7 @@ class ReadReadLengthTest {
assertByte(ReadLength.of(1), "0x00000001");
assertByte(ReadLength.of(65535), "0x0000ffff");
Assertions.assertThrows(IllegalArgumentException.class, () -> ReadLength.of(-1));
- Assertions.assertThrows(IllegalArgumentException.class, () -> ReadLength.of(Long.valueOf("4294967296")));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> ReadLength.of(4294967296L));
}
@Test
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/SampleSizeTest.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/SampleSizeTest.java
index db740d0..1f7bcee 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/SampleSizeTest.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/SampleSizeTest.java
@@ -37,7 +37,7 @@ class SampleSizeTest {
assertByte(SampleSize.of(1), "0x00000001");
assertByte(SampleSize.of(65535), "0x0000ffff");
Assertions.assertThrows(IllegalArgumentException.class, () -> SampleSize.of(-1));
- Assertions.assertThrows(IllegalArgumentException.class, () -> SampleSize.of(Long.valueOf("4294967296")));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> SampleSize.of(4294967296L));
}
@Test
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/SamplesTest.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/SamplesTest.java
index 82e0b7b..04579b7 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/SamplesTest.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/SamplesTest.java
@@ -37,7 +37,7 @@ class SamplesTest {
assertByte(Samples.of(1), "0x00000001");
assertByte(Samples.of(65535), "0x0000ffff");
Assertions.assertThrows(IllegalArgumentException.class, () -> Samples.of(-1));
- Assertions.assertThrows(IllegalArgumentException.class, () -> Samples.of(Long.valueOf("4294967296")));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> Samples.of(4294967296L));
}
@Test
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/WriteLengthTest.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/WriteLengthTest.java
index 633408a..9f78ff8 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/WriteLengthTest.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/commands/types/WriteLengthTest.java
@@ -37,7 +37,7 @@ class WriteLengthTest {
assertByte(WriteLength.of(1), "0x00000001");
assertByte(WriteLength.of(65535), "0x0000ffff");
Assertions.assertThrows(IllegalArgumentException.class, () -> WriteLength.of(-1));
- Assertions.assertThrows(IllegalArgumentException.class, () -> WriteLength.of(Long.valueOf("4294967296")));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> WriteLength.of(4294967296L));
}
@Test
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/generic/types/DataLengthTest.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/generic/types/DataLengthTest.java
index 4d5f8fb..e45cfc5 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/generic/types/DataLengthTest.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/generic/types/DataLengthTest.java
@@ -38,7 +38,7 @@ class DataLengthTest {
assertByte(DataLength.of(1), "0x00000001");
assertByte(DataLength.of(65535), "0x0000ffff");
Assertions.assertThrows(IllegalArgumentException.class, () -> DataLength.of(-1));
- Assertions.assertThrows(IllegalArgumentException.class, () -> DataLength.of(Long.valueOf("4294967296")));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> DataLength.of(4294967296L));
}
@Test
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/generic/types/LengthTest.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/generic/types/LengthTest.java
index 19e129e..b4fa27e 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/generic/types/LengthTest.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/api/generic/types/LengthTest.java
@@ -37,7 +37,7 @@ class LengthTest {
assertByte(Length.of(1), "0x00000001");
assertByte(Length.of(65535), "0x0000ffff");
Assertions.assertThrows(IllegalArgumentException.class, () -> Length.of(-1));
- Assertions.assertThrows(IllegalArgumentException.class, () -> Length.of(Long.valueOf("4294967296")));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> Length.of(4294967296L));
}
@Test
--
To stop receiving notification emails like this one, please contact
sruehl@apache.org.