You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by mo...@apache.org on 2013/06/17 19:48:22 UTC

svn commit: r1493856 - in /oozie/trunk/core/src: main/java/org/apache/oozie/executor/jpa/sla/SLARegistrationGetJPAExecutor.java test/java/org/apache/oozie/sla/TestSLAEventGeneration.java

Author: mona
Date: Mon Jun 17 17:48:22 2013
New Revision: 1493856

URL: http://svn.apache.org/r1493856
Log:
OOZIE-1418 tiny incremental patch

Modified:
    oozie/trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLARegistrationGetJPAExecutor.java
    oozie/trunk/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java

Modified: oozie/trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLARegistrationGetJPAExecutor.java
URL: http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLARegistrationGetJPAExecutor.java?rev=1493856&r1=1493855&r2=1493856&view=diff
==============================================================================
--- oozie/trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLARegistrationGetJPAExecutor.java (original)
+++ oozie/trunk/core/src/main/java/org/apache/oozie/executor/jpa/sla/SLARegistrationGetJPAExecutor.java Mon Jun 17 17:48:22 2013
@@ -55,15 +55,12 @@ public class SLARegistrationGetJPAExecut
         catch (Exception e) {
             throw new JPAExecutorException(ErrorCode.E0603, e.getMessage(), e);
         }
-        SLARegistrationBean slaRegBean;
+        SLARegistrationBean slaRegBean = null;
         if (regBeans != null && regBeans.size() > 0) {
             slaRegBean = regBeans.get(0);
             slaRegBean.setSlaConfig(slaRegBean.getSlaConfig());
-            return slaRegBean;
-        }
-        else {
-            throw new JPAExecutorException(ErrorCode.E0604, id);
         }
+        return slaRegBean;
     }
 
 }

Modified: oozie/trunk/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java
URL: http://svn.apache.org/viewvc/oozie/trunk/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java?rev=1493856&r1=1493855&r2=1493856&view=diff
==============================================================================
--- oozie/trunk/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java (original)
+++ oozie/trunk/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java Mon Jun 17 17:48:22 2013
@@ -302,8 +302,8 @@ public class TestSLAEventGeneration exte
                     .call();
         }
         catch (CommandException ce) {
-            if (ce.getErrorCode() == ErrorCode.E0603) {
-                fail("Coord Rerun with no SLA should not throw 'no job found error' from SLA Summary table");
+            if (ce.getErrorCode() == ErrorCode.E0604) {
+                fail("Coord Rerun with no SLA should not throw " + ce.getMessage() + " exception");
             }
         }
     }