Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2011-07-18 19:06:14 -0400
committerRyan D. Brooks2011-07-18 19:06:14 -0400
commite7235ace0f68aabbf9ae87376c6fa23116830deb (patch)
tree5cc8afacd83069bfb5b90097846cbe677d22a001
parent94d1071320662d53d9889004cac0f0f1f71106d9 (diff)
downloadorg.eclipse.osee-e7235ace0f68aabbf9ae87376c6fa23116830deb.tar.gz
org.eclipse.osee-e7235ace0f68aabbf9ae87376c6fa23116830deb.tar.xz
org.eclipse.osee-e7235ace0f68aabbf9ae87376c6fa23116830deb.zip
bug: SessionUtil throwing NullPointerException
-rw-r--r--plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java
index a7c21389a0..21f287cd29 100644
--- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java
+++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java
@@ -17,6 +17,7 @@ import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.server.IServerTask;
+import org.eclipse.osee.framework.core.server.ISession;
import org.eclipse.osee.framework.core.server.ISessionManager;
import org.eclipse.osee.framework.core.server.SchedulingScheme;
import org.eclipse.osee.framework.core.server.SessionUtil;
@@ -73,13 +74,15 @@ public class CleanJoinTablesServerTask implements IServerTask {
try {
chStmt = ConnectionHandler.getStatement();
chStmt.runPreparedQuery(SELECT_SESSION_FROM_JOIN);
+
String prevSessionId = "";
while (chStmt.next()) {
String sessionId = chStmt.getString("session_id");
String tableName = chStmt.getString("table_name");
Integer queryId = chStmt.getInt("query_id");
if (!sessionId.equals(prevSessionId)) {
- isAlive = SessionUtil.isAlive(manager.getSessionById(sessionId));
+ ISession sessionById = manager.getSessionById(sessionId);
+ isAlive = sessionById != null && SessionUtil.isAlive(sessionById);
}
if (!isAlive) {
queryIds.add(new Integer[] {queryId});

Back to the top