fix for NoSuchElement Exception during deployment

Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/818fbf7d
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/818fbf7d
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/818fbf7d

Branch: refs/heads/ode-1.3.x
Commit: 818fbf7da2eb67117760f79568cb9b2f4f23d42a
Parents: 3d31943
Author: sathwik <[email protected]>
Authored: Wed Sep 14 11:26:28 2016 +0530
Committer: sathwik <[email protected]>
Committed: Wed Sep 14 11:26:28 2016 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/ode/dao/jpa/BPELDAOConnectionImpl.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/818fbf7d/dao-jpa/src/main/java/org/apache/ode/dao/jpa/BPELDAOConnectionImpl.java
----------------------------------------------------------------------
diff --git 
a/dao-jpa/src/main/java/org/apache/ode/dao/jpa/BPELDAOConnectionImpl.java 
b/dao-jpa/src/main/java/org/apache/ode/dao/jpa/BPELDAOConnectionImpl.java
index f161d6e..e4c2fe0 100644
--- a/dao-jpa/src/main/java/org/apache/ode/dao/jpa/BPELDAOConnectionImpl.java
+++ b/dao-jpa/src/main/java/org/apache/ode/dao/jpa/BPELDAOConnectionImpl.java
@@ -109,7 +109,7 @@ public class BPELDAOConnectionImpl implements 
BpelDAOConnection {
     public ProcessDAO getProcess(QName processId) {
         List l = _em.createQuery("select x from ProcessDAOImpl x where 
x._processId = ?1")
                 .setParameter(1, processId.toString()).getResultList();
-        if (l.size() == 0) return null;
+        if (l.isEmpty()) return null;
         ProcessDAOImpl p = (ProcessDAOImpl) l.get(0);
         return p;
     }

Reply via email to