You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jm...@apache.org on 2018/01/06 00:33:31 UTC

[incubator-plc4x] branch master updated (4383c38 -> 79f031d)

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

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


    from 4383c38  log exception
     new 1e853eb  add @override
     new 79f031d  unneeded brackets

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/plc4x/camel/PLC4XProducer.java       | 2 ++
 .../main/java/org/apache/plc4x/java/s7/netty/Plc4XS7Protocol.java | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

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

[incubator-plc4x] 01/02: add @override

Posted by jm...@apache.org.
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 1e853eb38b35c978bc20efa4ad77ee857757b5cd
Author: Justin Mclean <jm...@apache.org>
AuthorDate: Sat Jan 6 11:32:31 2018 +1100

    add @override
---
 .../src/main/java/org/apache/plc4x/camel/PLC4XProducer.java             | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/integrations/apache-camel/src/main/java/org/apache/plc4x/camel/PLC4XProducer.java b/integrations/apache-camel/src/main/java/org/apache/plc4x/camel/PLC4XProducer.java
index e11d1e5..60bd899 100644
--- a/integrations/apache-camel/src/main/java/org/apache/plc4x/camel/PLC4XProducer.java
+++ b/integrations/apache-camel/src/main/java/org/apache/plc4x/camel/PLC4XProducer.java
@@ -51,6 +51,7 @@ public class PLC4XProducer extends DefaultAsyncProducer {
     }
 
     @SuppressWarnings("unchecked")
+    @Override
     public void process(Exchange exchange) throws Exception {
         Message in = exchange.getIn();
         Address address = in.getHeader(Constants.ADDRESS_HEADER, Address.class);
@@ -76,6 +77,7 @@ public class PLC4XProducer extends DefaultAsyncProducer {
         }
     }
 
+    @Override
     public boolean process(Exchange exchange, AsyncCallback callback) {
         try {
             process(exchange);

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

[incubator-plc4x] 02/02: unneeded brackets

Posted by jm...@apache.org.
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 79f031d3587cb3142c90d4e9e0619b8c85de7e9d
Author: Justin Mclean <jm...@apache.org>
AuthorDate: Sat Jan 6 11:33:23 2018 +1100

    unneeded brackets
---
 .../main/java/org/apache/plc4x/java/s7/netty/Plc4XS7Protocol.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/Plc4XS7Protocol.java b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/Plc4XS7Protocol.java
index ed69c1f..a0520c8 100644
--- a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/Plc4XS7Protocol.java
+++ b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/netty/Plc4XS7Protocol.java
@@ -371,15 +371,15 @@ public class Plc4XS7Protocol extends MessageToMessageCodec<S7Message, PlcRequest
                 result.add((short) (((s7Data[i] & 0xff) << 8) | (s7Data[i+1] & 0xff)));
                 i+=2;
             } else if (datatype == Integer.class) {
-                result.add((((s7Data[i] & 0xff) << 24) | ((s7Data[i + 1] & 0xff) << 16) |
-                    ((s7Data[i + 2] & 0xff) << 8) | (s7Data[i + 3] & 0xff)));
+                result.add(((s7Data[i] & 0xff) << 24) | ((s7Data[i + 1] & 0xff) << 16) |
+                    ((s7Data[i + 2] & 0xff) << 8) | (s7Data[i + 3] & 0xff));
                 i+=4;
             } else if (datatype == Float.class) {
                 // Description of the Real number format:
                 // https://www.sps-lehrgang.de/zahlenformate-step7/#c144
                 // https://de.wikipedia.org/wiki/IEEE_754
-                int intValue = (((s7Data[i] & 0xff) << 24) | ((s7Data[i + 1] & 0xff) << 16) |
-                    ((s7Data[i + 2] & 0xff) << 8) | (s7Data[i + 3] & 0xff));
+                int intValue = ((s7Data[i] & 0xff) << 24) | ((s7Data[i + 1] & 0xff) << 16) |
+                    ((s7Data[i + 2] & 0xff) << 8) | (s7Data[i + 3] & 0xff);
                 result.add(Float.intBitsToFloat(intValue));
                 i+=4;
             } else {

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