Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-12-23 17:02:39 +0000
committerRyan D. Brooks2015-12-23 17:02:39 +0000
commit491e33655af14eb3e0e19c3e68bfb4377eb26efa (patch)
tree1151508caa0c1aead471124941155914a8b57924 /plugins/org.eclipse.osee.framework.manager.servlet
parent707b3e7a293e5fab698327ccaa6fd9d3c0a1965d (diff)
downloadorg.eclipse.osee-491e33655af14eb3e0e19c3e68bfb4377eb26efa.tar.gz
org.eclipse.osee-491e33655af14eb3e0e19c3e68bfb4377eb26efa.tar.xz
org.eclipse.osee-491e33655af14eb3e0e19c3e68bfb4377eb26efa.zip
refactor: Use OseeCoreException.wrap were applicable
Diffstat (limited to 'plugins/org.eclipse.osee.framework.manager.servlet')
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/ArtifactFileServlet.java5
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/ServletResourceBridge.java7
2 files changed, 4 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/ArtifactFileServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/ArtifactFileServlet.java
index 1b44bf520d7..97a2a533a88 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/ArtifactFileServlet.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/ArtifactFileServlet.java
@@ -17,7 +17,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreBranches;
-import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.core.server.UnsecuredOseeHttpServlet;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
@@ -145,7 +144,7 @@ public class ArtifactFileServlet extends UnsecuredOseeHttpServlet {
Lib.inputStreamToOutputStream(inputStream, response.getOutputStream());
response.flushBuffer();
} catch (IOException ex) {
- OseeExceptions.wrapAndThrow(ex);
+ OseeCoreException.wrapAndThrow(ex);
} finally {
Lib.close(inputStream);
}
@@ -157,7 +156,7 @@ public class ArtifactFileServlet extends UnsecuredOseeHttpServlet {
try {
response.getWriter().write(String.format("Unable to find resource: [%s]", request));
} catch (IOException ex) {
- OseeExceptions.wrapAndThrow(ex);
+ OseeCoreException.wrapAndThrow(ex);
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/ServletResourceBridge.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/ServletResourceBridge.java
index 4b138afaa84..9c583ec1cc4 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/ServletResourceBridge.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/ServletResourceBridge.java
@@ -14,7 +14,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import javax.servlet.http.HttpServletRequest;
-import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.resource.management.IResource;
import org.eclipse.osee.framework.resource.management.IResourceLocator;
@@ -36,13 +35,11 @@ public class ServletResourceBridge implements IResource {
@Override
public InputStream getContent() throws OseeCoreException {
- InputStream stream = null;
try {
- stream = request.getInputStream();
+ return request.getInputStream();
} catch (IOException ex) {
- OseeExceptions.wrapAndThrow(ex);
+ throw OseeCoreException.wrap(ex);
}
- return stream;
}
@Override

Back to the top