sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cheol...@apache.org
Subject [3/5] git commit: SQOOP-879: NPE when deleting job object that do not have associated any submissions
Date Sun, 10 Feb 2013 21:30:28 GMT
SQOOP-879: NPE when deleting job object that do not have associated any submissions

(Jarcec Cecho via Cheolsoo Park)


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

Branch: refs/heads/sqoop2
Commit: b80b2d8e63043cea338ce34ea36e75ffac7aef06
Parents: e8ca6f6
Author: Cheolsoo Park <cheolsoo@apache.org>
Authored: Sun Feb 10 13:17:05 2013 -0800
Committer: Cheolsoo Park <cheolsoo@apache.org>
Committed: Sun Feb 10 13:17:05 2013 -0800

----------------------------------------------------------------------
 .../repository/derby/DerbyRepositoryHandler.java   |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/b80b2d8e/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
index 5e24ae3..8af86b7 100644
--- a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
+++ b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
@@ -727,6 +727,11 @@ public class DerbyRepositoryHandler implements JdbcRepositoryHandler
{
   public boolean inUseJob(long jobId, Connection conn) {
     MSubmission submission = findSubmissionLastForJob(jobId, conn);
 
+    // We have no submissions and thus job can't be in use
+    if(submission == null) {
+      return false;
+    }
+
     // We can't remove running job
     if(submission.getStatus().isRunning()) {
       return true;


Mime
View raw message