Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2016-05-17 20:59:40 +0000
committerAngel Avila2016-05-17 20:59:40 +0000
commit692d03cd692ee24251a043017520b9ff870846fe (patch)
treefb00f77155d39a2f985aea04b91095ad94a96617 /plugins/org.eclipse.osee.ote.define
parentb7c6c777bd6a51b8b9066ec8aac517c8a08db7f3 (diff)
downloadorg.eclipse.osee-692d03cd692ee24251a043017520b9ff870846fe.tar.gz
org.eclipse.osee-692d03cd692ee24251a043017520b9ff870846fe.tar.xz
org.eclipse.osee-692d03cd692ee24251a043017520b9ff870846fe.zip
refactor[ats_ATS284247]: Remove redundant null checks
Signed-off-by: Morgan E. Cook <Morgan.e.cook@boeing.com> Change-Id: Ic0b70768a7da7cece5a8a0b4c5746654add26193
Diffstat (limited to 'plugins/org.eclipse.osee.ote.define')
-rw-r--r--plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java28
1 files changed, 13 insertions, 15 deletions
diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java
index 3b497272286..368d00c0bb1 100644
--- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java
+++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java
@@ -34,11 +34,11 @@ import org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes;
* @author Roberto E. Escobar
*/
public class ArtifactTestRunOperator implements TestRunOperator {
- private static final OteArtifactFetcher<Artifact> TEST_RUN_ARTIFACT_FETCHER = new OteArtifactFetcher<>(
- CoreArtifactTypes.TestRun);
+ private static final OteArtifactFetcher<Artifact> TEST_RUN_ARTIFACT_FETCHER =
+ new OteArtifactFetcher<>(CoreArtifactTypes.TestRun);
- private static final OteArtifactFetcher<Artifact> TEST_SCRIPT_ARTIFACT_FETCHER = new OteArtifactFetcher<>(
- CoreArtifactTypes.TestCase);
+ private static final OteArtifactFetcher<Artifact> TEST_SCRIPT_ARTIFACT_FETCHER =
+ new OteArtifactFetcher<>(CoreArtifactTypes.TestCase);
private final Artifact artifact;
@@ -149,12 +149,12 @@ public class ArtifactTestRunOperator implements TestRunOperator {
boolean toReturn = false;
try {
URI url = new URI(getScriptUrl());
- if (url != null) {
- String revision = getScriptRevision();
- if (Strings.isValid(revision)) {
- toReturn = true;
- }
+
+ String revision = getScriptRevision();
+ if (Strings.isValid(revision)) {
+ toReturn = true;
}
+
} catch (Exception ex) {
}
return toReturn;
@@ -163,9 +163,8 @@ public class ArtifactTestRunOperator implements TestRunOperator {
public boolean hasNotBeenCommitted() {
Artifact fetched = null;
try {
- fetched =
- getTestRunFetcher().searchForUniqueArtifactMatching(OteAttributeTypes.CHECKSUM, getChecksum(),
- artifact.getBranch());
+ fetched = getTestRunFetcher().searchForUniqueArtifactMatching(OteAttributeTypes.CHECKSUM, getChecksum(),
+ artifact.getBranch());
} catch (Exception ex) {
}
return fetched == null;
@@ -180,9 +179,8 @@ public class ArtifactTestRunOperator implements TestRunOperator {
}
public void createTestScriptSoftLink() throws OseeCoreException {
- Artifact testScript =
- getTestScriptFetcher().searchForUniqueArtifactMatching(CoreAttributeTypes.Name, artifact.getName(),
- artifact.getBranch());
+ Artifact testScript = getTestScriptFetcher().searchForUniqueArtifactMatching(CoreAttributeTypes.Name,
+ artifact.getName(), artifact.getBranch());
if (testScript != null) {
artifact.setSoleAttributeValue(CoreAttributeTypes.TestScriptGuid, testScript.getGuid());
}

Back to the top