This is an automated email from the ASF dual-hosted git repository.

jmclean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit 9fad0627e3901f36ba15f71d3561af40ab92b4eb
Author: Justin Mclean <jmcl...@apache.org>
AuthorDate: Sun Jan 14 10:01:08 2018 +1100

    now UNKNOWN rather than null adn null can give rise to NPEs
---
 .../apache/plc4x/java/isotp/netty/model/types/IsotpTypeTests.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/isotp/netty/model/types/IsotpTypeTests.java
 
b/plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/isotp/netty/model/types/IsotpTypeTests.java
index 8a91e01..47acf5b 100644
--- 
a/plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/isotp/netty/model/types/IsotpTypeTests.java
+++ 
b/plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/isotp/netty/model/types/IsotpTypeTests.java
@@ -141,9 +141,10 @@ class IsotpTypeTests {
     void tpduCodeUnknown() {
         TpduCode tpduCode = TpduCode.valueOf((byte)0x01);
 
-        assertNull(tpduCode, "expected tpdu code to be null");
+        assertTrue(TpduCode.valueOf((byte)0xFF) == TpduCode.TPDU_UNKNOWN, 
"0xFF incorrectly mapped");
+        assertTrue(tpduCode.getCode() == (byte)0xFF, "code is not 0xFF");
     }
-
+    
     @Test
     @Tag("fast")
     void typduSize() {

-- 
To stop receiving notification emails like this one, please contact
"commits@plc4x.apache.org" <commits@plc4x.apache.org>.

Reply via email to