diff options
author | rbrooks | 2010-09-16 20:32:48 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2010-09-16 20:32:48 +0000 |
commit | f0f991b4f728f2e7550016da91eb2e8d2c8c750c (patch) | |
tree | 7ad402016cbf8810f6f6ffe43c3a7dccab95f402 /plugins/org.eclipse.osee.framework.core.client | |
parent | 445b78e7fdb5067609dd91f8b348ea91313ecedc (diff) | |
download | org.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.tar.gz org.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.tar.xz org.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.zip |
refactor: Utilize utility method OseeExceptions.wrapAndThrow instead of in-place code
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.client')
-rw-r--r-- | plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpUrlBuilderClient.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpUrlBuilderClient.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpUrlBuilderClient.java index bac8004b1bb..0cc809a7011 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpUrlBuilderClient.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpUrlBuilderClient.java @@ -19,6 +19,7 @@ import org.eclipse.osee.framework.core.client.OseeClientProperties; import org.eclipse.osee.framework.core.client.internal.OseeApplicationServer; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeDataStoreException; +import org.eclipse.osee.framework.core.exception.OseeExceptions; import org.eclipse.osee.framework.core.exception.OseeStateException; import org.eclipse.osee.framework.jdk.core.util.HttpUrlBuilder; import org.eclipse.osee.framework.logging.OseeLog; @@ -74,15 +75,17 @@ public class HttpUrlBuilderClient { try { return HttpUrlBuilder.createURL(getApplicationServerPrefix(), context, parameters); } catch (UnsupportedEncodingException ex) { - throw new OseeDataStoreException(ex); + OseeExceptions.wrapAndThrow(ex); + return null; // unreachable since wrapAndThrow() always throws an exception } } - public String getOsgiArbitrationServiceUrl(String context, Map<String, String> parameters) throws OseeDataStoreException { + public String getOsgiArbitrationServiceUrl(String context, Map<String, String> parameters) throws OseeCoreException { try { return HttpUrlBuilder.createURL(getArbitrationServerPrefix(), context, parameters); } catch (UnsupportedEncodingException ex) { - throw new OseeDataStoreException(ex); + OseeExceptions.wrapAndThrow(ex); + return null; // unreachable since wrapAndThrow() always throws an exception } } } |