Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-14 14:46:03 -0400
committerRyan D. Brooks2010-09-14 14:46:03 -0400
commit14ec406b2105173c444154ffff52e90fa469c224 (patch)
tree96282feb5f349a96a1fbb6c0c9fcb460b5e32946 /plugins
parent48513a697800a686eeb227923de2c11219bf6e88 (diff)
downloadorg.eclipse.osee-14ec406b2105173c444154ffff52e90fa469c224.tar.gz
org.eclipse.osee-14ec406b2105173c444154ffff52e90fa469c224.tar.xz
org.eclipse.osee-14ec406b2105173c444154ffff52e90fa469c224.zip
refactor: Remove unnecessary exception OseeInvalidSessionException
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java10
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/exception/OseeInvalidSessionException.java31
2 files changed, 3 insertions, 38 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java
index dff5f9e563..2751c6c10e 100644
--- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java
+++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java
@@ -20,7 +20,6 @@ import org.eclipse.osee.framework.core.data.OseeCredential;
import org.eclipse.osee.framework.core.data.OseeSessionGrant;
import org.eclipse.osee.framework.core.enums.StorageState;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeInvalidSessionException;
import org.eclipse.osee.framework.core.server.IAuthenticationManager;
import org.eclipse.osee.framework.core.server.ISession;
import org.eclipse.osee.framework.core.server.ISessionManager;
@@ -82,12 +81,9 @@ public final class SessionManagerImpl implements ISessionManager {
public void updateSessionActivity(String sessionId, String interactionName) throws OseeCoreException {
Conditions.checkNotNull(sessionId, "sessionId");
Session session = getSessionById(sessionId);
- if (session != null) {
- session.setLastInteractionDetails(Strings.isValid(interactionName) ? interactionName : "unknown");
- session.setLastInteractionDate(GlobalTime.GreenwichMeanTimestamp());
- } else {
- throw new OseeInvalidSessionException(String.format("Session was invalid: [%s]", sessionId));
- }
+ Conditions.checkNotNull(session, "Session", "for id [%s]", sessionId);
+ session.setLastInteractionDetails(Strings.isValid(interactionName) ? interactionName : "unknown");
+ session.setLastInteractionDate(GlobalTime.GreenwichMeanTimestamp());
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/exception/OseeInvalidSessionException.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/exception/OseeInvalidSessionException.java
deleted file mode 100644
index b8cf945f49..0000000000
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/exception/OseeInvalidSessionException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.exception;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OseeInvalidSessionException extends OseeCoreException {
-
- private static final long serialVersionUID = 5540912279421352009L;
-
- public OseeInvalidSessionException(String message) {
- super(message);
- }
-
- public OseeInvalidSessionException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public OseeInvalidSessionException(Throwable cause) {
- super(cause);
- }
-}

Back to the top