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/12 00:28:15 UTC

[incubator-plc4x] 03/10: use isEmpty()

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 3e9e12a8e6812d72bf1b3bad9c0ade90bef433c8
Author: Justin Mclean <jm...@apache.org>
AuthorDate: Fri Jan 12 11:07:33 2018 +1100

    use isEmpty()
---
 .../main/java/org/apache/plc4x/java/api/messages/PlcReadRequest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcReadRequest.java b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcReadRequest.java
index 4c7f2a9..7ae3d78 100644
--- a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcReadRequest.java
+++ b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcReadRequest.java
@@ -71,7 +71,7 @@ public class PlcReadRequest extends PlcRequest<ReadRequestItem<?>> {
 
         @SuppressWarnings("unchecked")
         public PlcReadRequest build() {
-            if (requests.size() < 1) {
+            if (requests.isEmpty()) {
                 throw new IllegalStateException("No requests added");
             }
             PlcReadRequest plcReadRequest;

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