Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-16 15:31:01 -0400
committerRyan D. Brooks2010-09-16 15:31:01 -0400
commit9f3a5a2a4e62adf2155550fc5e8feca678db4f45 (patch)
treeb5b23fd1c1bd411a4cca6720bff34b44d08f7e6f /plugins
parent39881b1e24c6920529454dcbf3c8e2b4805cae84 (diff)
downloadorg.eclipse.osee-9f3a5a2a4e62adf2155550fc5e8feca678db4f45.tar.gz
org.eclipse.osee-9f3a5a2a4e62adf2155550fc5e8feca678db4f45.tar.xz
org.eclipse.osee-9f3a5a2a4e62adf2155550fc5e8feca678db4f45.zip
refactor: Replace usage of unchecked exceptions with appropriate OSEE exception
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/RelationImporter.java5
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java5
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/RelationImporter.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/RelationImporter.java
index d3eb1919ae..63e0d72e5f 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/RelationImporter.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/RelationImporter.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes;
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.util.io.xml.ExcelSaxHandler;
import org.eclipse.osee.framework.jdk.core.util.io.xml.RowProcessor;
@@ -100,14 +101,14 @@ public class RelationImporter implements RowProcessor {
}
}
- private Artifact getSoleArtifact(Collection<Artifact> artifacts) {
+ private Artifact getSoleArtifact(Collection<Artifact> artifacts) throws OseeArgumentException {
Artifact artifactResult = null;
boolean soleArtifact = true;
for (Artifact artifact : artifacts) {
if (soleArtifact) {
soleArtifact = false;
} else {
- throw new IllegalArgumentException("Found more than one match for: " + artifact);
+ throw new OseeArgumentException("Found more than one match for: " + artifact);
}
artifactResult = artifact;
}
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java
index f7b9a091a2..d86602a34d 100644
--- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java
@@ -23,6 +23,7 @@ import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.osee.framework.core.client.CoreClientActivator;
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -186,7 +187,7 @@ public class HttpRequest {
urlRequest = matcher.group(1);
if (!Strings.isValid(urlRequest)) {
- throw new IllegalArgumentException("Unknown requestType \"" + rawRequest + "\"");
+ throw new OseeArgumentException("Unknown requestType \"" + rawRequest + "\"");
}
String data = matcher.group(2);
Matcher dataMatcher = Pattern.compile("([^&]*?)=([^&]*)").matcher(data);
@@ -222,7 +223,7 @@ public class HttpRequest {
parameterMap.put("guid", guid);
urlRequest = "Define";
} else {
- throw new IllegalArgumentException("Unnable to parse old style link: \"" + rawRequest + "\"");
+ throw new OseeArgumentException("Unnable to parse old style link: \"" + rawRequest + "\"");
}
}
}

Back to the top