summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2012-03-20 20:28:49 (EDT)
committerRoberto E. Escobar2012-03-20 20:28:49 (EDT)
commit5a3c5603220bd8652c7661eb89594db32c46fe0b (patch)
tree82561c98327f9b3fe8e2b2f4cbf53eb3d957a824
parentb1a83b38b898c25bd990eb37e08a46298fa627b6 (diff)
downloadorg.eclipse.osee-5a3c5603220bd8652c7661eb89594db32c46fe0b.zip
org.eclipse.osee-5a3c5603220bd8652c7661eb89594db32c46fe0b.tar.gz
org.eclipse.osee-5a3c5603220bd8652c7661eb89594db32c46fe0b.tar.bz2
refactor: Minor quality fixes
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java2
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java8
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_Demo.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/rule/OseeHousekeepingRule.java20
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java1
7 files changed, 13 insertions, 27 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java
index f9a2393..9cce777 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/team/TeamWorkFlowArtifact.java
@@ -111,7 +111,7 @@ public class TeamWorkFlowArtifact extends AbstractTaskableArtifact implements IA
public String getEditorTitle() throws OseeCoreException {
try {
if (getTargetedVersion() != null) {
- return getType() + ": " + "[" + getTargetedVersionStr() + "] - " + getName();
+ return String.format("%s: [%s] - %s", getType(), getTargetedVersionStr(), getName());
}
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java
index 469e8d6..b1c41cb 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/actions/AbstractAtsActionTest.java
@@ -9,7 +9,6 @@ import junit.framework.Assert;
import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.core.AtsTestUtil;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.rule.OseeHousekeepingRule;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -24,9 +23,7 @@ public abstract class AbstractAtsActionTest {
@BeforeClass
@AfterClass
public static void cleanup() throws Throwable {
- String name = AtsTestUtil.getName();
AtsTestUtil.cleanup();
- OseeHousekeepingRule.verify(name, name);
}
@Test
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
index 8323703..9b2aea3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
@@ -100,10 +100,6 @@ public class SMAEditor extends AbstractArtifactEditor implements IDirtyReportabl
private final List<ISMAEditorListener> editorListeners = new ArrayList<ISMAEditorListener>();
SMAEditorOutlinePage outlinePage;
- public SMAEditor() {
- super();
- }
-
@Override
protected void addPages() {
try {
@@ -648,9 +644,7 @@ public class SMAEditor extends AbstractArtifactEditor implements IDirtyReportabl
@Override
public List<Artifact> getSelectedAtsArtifacts() {
- List<Artifact> arts = new ArrayList<Artifact>();
- arts.add(awa);
- return arts;
+ return Collections.<Artifact> singletonList(awa);
}
@Override
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_Demo.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_Demo.java
index d7e14d5..31b1a63 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_Demo.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/MasterTestSuite_Demo.java
@@ -22,7 +22,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({//
+@Suite.SuiteClasses({
MasterTestSuite_DemoDbInit.class,
MasterTestSuite_DemoCoreTests.class,
MasterTestSuite_DemoDbPopulate.class,
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTest.java
index 613bc2f..31225a9 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/revision/ConflictTest.java
@@ -206,9 +206,9 @@ public class ConflictTest {
//@formatter:off
private static final String NO_TX_CURRENT_SET =
- "SELECT distinct t1.%s, txs1.branch_id FROM osee_txs txs1, %s t1 " +
+ "SELECT DISTINCT t1.%s, txs1.branch_id FROM osee_txs txs1, %s t1 " +
"WHERE txs1.gamma_id = t1.gamma_id AND txs1.tx_current = 0 %s " +
- "SELECT distinct t2.%s, txs2.branch_id FROM osee_txs txs2, %s t2 " +
+ "SELECT DISTINCT t2.%s, txs2.branch_id FROM osee_txs txs2, %s t2 " +
"WHERE txs2.gamma_id = t2.gamma_id AND txs2.tx_current != 0";
private static final String MULTIPLE_TX_CURRENT_SET =
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/rule/OseeHousekeepingRule.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/rule/OseeHousekeepingRule.java
index 4e06591..4b5ac41 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/rule/OseeHousekeepingRule.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/rule/OseeHousekeepingRule.java
@@ -20,16 +20,12 @@ import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;
/**
- * <p>
- * Not related to {@link Rule}.
- * </p>
- * <p>
+ * Not related to {@link org.eclipse.osee.framework.jdk.core.text.Rule}. <br/>
+ * <br/>
* Checks Artifact Cache for dirty artifacts. Executes after a passing test. Fails tests that have passed but left dirty
- * artifacts in the cache.
- * </p>
- * <p>
- * In the future the behavior of this class could be modified to clean up after a test, regardless of test's context.
- * </p>
+ * artifacts in the cache. <br/>
+ * <br/>
+ * In the future the behavior of this class could be modified to clean up after a test, regardless of test context.
*/
public final class OseeHousekeepingRule implements MethodRule {
@@ -48,15 +44,15 @@ public final class OseeHousekeepingRule implements MethodRule {
};
}
- public static void verify(String methodName, String className) throws Throwable {
+ private void verify(String methodName, String className) throws Throwable {
final Collection<Artifact> dirtyArtifacts = ArtifactCache.getDirtyArtifacts();
if (!dirtyArtifacts.isEmpty()) {
StringBuilder entireMessage = new StringBuilder(DIRTY_ARTIFACTS_IN_ARTIFACT_CACHE.length() + MSG.length() * 2);
entireMessage.append(DIRTY_ARTIFACTS_IN_ARTIFACT_CACHE);
for (Artifact artifact : dirtyArtifacts) {
- entireMessage.append(String.format(MSG, artifact.getName(), artifact.getArtifactType(),
- className, methodName, Artifacts.getDirtyReport(artifact)));
+ entireMessage.append(String.format(MSG, artifact.getName(), artifact.getArtifactType(), className,
+ methodName, Artifacts.getDirtyReport(artifact)));
}
Assert.fail(entireMessage.toString());
}
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java
index 501082f..2bf4725 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java
@@ -147,7 +147,6 @@ public class ComputeNetChangeTest {
private final boolean isRemoved;
public TestData(ChangeItem item, ChangeVersion expectedNet, boolean isRemoved) {
- super();
this.item = item;
this.expectedNet = expectedNet;
this.isRemoved = isRemoved;