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/05 03:34:26 UTC

[incubator-plc4x] 01/02: no need for local variable

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 f9d3fa15fded237f29885605227eb6627334d9ae
Author: Justin Mclean <jm...@apache.org>
AuthorDate: Fri Jan 5 14:33:46 2018 +1100

    no need for local variable
---
 .../src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java b/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
index 2bff661..ab1c709 100644
--- a/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
+++ b/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
@@ -112,8 +112,7 @@ public class PlcConnectionAdapter implements AutoCloseable{
           address = connection.parseAddress(addressStr);
           PlcReader reader = connection.getReader().get();
           PlcReadRequest readRequest = PlcConnectionAdapter.newPlcReadRequest(datatype, address);
-          T value = (T) reader.read(readRequest).get().getResponseItems().get(0).getValues().get(0);
-          return value;
+          return (T) reader.read(readRequest).get().getResponseItems().get(0).getValues().get(0);
         }
         catch (Exception e) {
           logger.error("reading from plc device {} {} failed", connection, address, e);

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