From 50b229c45d75846c06cd475e7adb9f67981a84ca Mon Sep 17 00:00:00 2001 From: kwilk Date: Tue, 10 Jan 2012 14:33:48 -0700 Subject: refactor: Code quality improvements --- .../src/org/eclipse/osee/ats/core/AtsTestUtil.java | 11 ++++---- .../ats/core/config/TeamDefinitionManagerCore.java | 3 +- .../AtsForceAssigneesToTeamLeadsStateItemTest.java | 15 +++++----- .../osee/ats/world/search/WorldUISearchItem.java | 3 +- .../eclipse/osee/coverage/CoverageManagerTest.java | 6 +++- .../skynet/core/revision/ConflictTest.java | 11 ++++++-- .../skynet/core/rule/OseeHousekeepingRule.java | 2 +- .../skynet/core/util/FrameworkTestUtil.java | 15 ++-------- .../skynet/core/artifact/BranchManager.java | 3 +- .../cases/ReplaceRelationWithBaselineTest.java | 32 ++++++++++++++-------- .../ui/skynet/test/cases/WordEditTest.java | 3 +- .../ReplaceArtifactWithBaselineOperation.java | 2 +- .../ui/skynet/render/FileSystemRenderer.java | 2 +- 13 files changed, 59 insertions(+), 49 deletions(-) diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java index fd4c04280ae..08e8edd3e25 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsTestUtil.java @@ -81,7 +81,7 @@ public class AtsTestUtil { private static TeamWorkFlowArtifact teamArt = null; private static TeamWorkFlowArtifact teamArt2 = null; private static TeamDefinitionArtifact teamDef = null; - private static VersionArtifact verArt1 = null, verArt2 = null; + private static VersionArtifact verArt1, verArt2 = null; private static DecisionReviewArtifact decRevArt = null; private static PeerToPeerReviewArtifact peerRevArt = null; private static TaskArtifact taskArt = null; @@ -89,20 +89,21 @@ public class AtsTestUtil { private static ActionableItemArtifact testAi2 = null; private static ActionArtifact actionArt = null; private static ActionArtifact actionArt2 = null; - private static StateDefinition analyze = null, implement = null, completed = null, cancelled = null; + private static StateDefinition analyze, implement, completed, cancelled = null; private static WorkDefinition workDef = null; public static String WORK_DEF_NAME = "Test_Team _Workflow_Definition"; private static WidgetDefinition estHoursWidgetDef, workPackageWidgetDef; private static String postFixName; public static void validateArtifactCache() throws OseeStateException { - if (ArtifactCache.getDirtyArtifacts().size() > 0) { - for (Artifact artifact : ArtifactCache.getDirtyArtifacts()) { + final Collection dirtyArtifacts = ArtifactCache.getDirtyArtifacts(); + if (!dirtyArtifacts.isEmpty()) { + for (Artifact artifact : dirtyArtifacts) { System.err.println(String.format("Artifact [%s] is dirty [%s]", artifact.toStringWithId(), Artifacts.getDirtyReport(artifact))); } throw new OseeStateException("[%d] Dirty Artifacts found after populate (see console for details)", - ArtifactCache.getDirtyArtifacts().size()); + dirtyArtifacts.size()); } } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitionManagerCore.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitionManagerCore.java index 09b66cde48b..8534db8d4d2 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitionManagerCore.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitionManagerCore.java @@ -11,6 +11,7 @@ package org.eclipse.osee.ats.core.config; import java.util.Collection; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -39,7 +40,7 @@ public class TeamDefinitionManagerCore { if (parentArt instanceof ActionableItemArtifact) { return getImpactedTeamDefInherited((ActionableItemArtifact) parentArt); } - return java.util.Collections.emptyList(); + return Collections. emptyList(); } } diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java index 190a9a78719..a17f17fc52d 100644 --- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java +++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java @@ -40,7 +40,10 @@ import org.junit.Test; */ public class AtsForceAssigneesToTeamLeadsStateItemTest { - public static TeamWorkFlowArtifact teamArt; + private static final String JOE_SMITH = "Joe Smith"; + private static final String ALEX_KAY = "Alex Kay"; + + private static TeamWorkFlowArtifact teamArt; @Before public void setUp() throws Exception { @@ -79,14 +82,13 @@ public class AtsForceAssigneesToTeamLeadsStateItemTest { // assignee should be Joe Smith Assert.assertEquals(1, teamArt.getStateMgr().getAssignees().size()); - Assert.assertEquals(UserManager.getUserByName("Joe Smith"), - teamArt.getStateMgr().getAssignees().iterator().next()); + Assert.assertEquals(UserManager.getUserByName(JOE_SMITH), teamArt.getStateMgr().getAssignees().iterator().next()); // set assignee to Alex Kay - teamArt.getStateMgr().setAssignee(UserManager.getUserByName("Alex Kay")); + teamArt.getStateMgr().setAssignee(UserManager.getUserByName(ALEX_KAY)); teamArt.persist(getClass().getSimpleName()); Assert.assertEquals(1, teamArt.getStateMgr().getAssignees().size()); - Assert.assertEquals(UserManager.getUserByName("Alex Kay"), teamArt.getStateMgr().getAssignees().iterator().next()); + Assert.assertEquals(UserManager.getUserByName(ALEX_KAY), teamArt.getStateMgr().getAssignees().iterator().next()); IWorkPage fromState = teamArt.getWorkDefinition().getStateByName(TeamState.Analyze.getPageName()); IWorkPage toState = teamArt.getWorkDefinition().getStateByName(TeamState.Authorize.getPageName()); @@ -103,7 +105,6 @@ public class AtsForceAssigneesToTeamLeadsStateItemTest { // assignee should be Joe Smith Assert.assertEquals(1, teamArt.getStateMgr().getAssignees().size()); - Assert.assertEquals(UserManager.getUserByName("Joe Smith"), - teamArt.getStateMgr().getAssignees().iterator().next()); + Assert.assertEquals(UserManager.getUserByName(JOE_SMITH), teamArt.getStateMgr().getAssignees().iterator().next()); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/WorldUISearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/WorldUISearchItem.java index 5eea3cd4eb8..3a724ce95a9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/WorldUISearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/WorldUISearchItem.java @@ -11,6 +11,7 @@ package org.eclipse.osee.ats.world.search; import java.util.Collection; +import java.util.Collections; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLevel; @@ -91,7 +92,7 @@ public abstract class WorldUISearchItem extends WorldSearchItem { } if (cancelled) { - return EMPTY_SET; + return Collections.emptySet(); } return performSearch(searchType); } diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/CoverageManagerTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/CoverageManagerTest.java index 50f65bd96a0..218e962964a 100644 --- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/CoverageManagerTest.java +++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/CoverageManagerTest.java @@ -13,18 +13,22 @@ package org.eclipse.osee.coverage; import static org.junit.Assert.fail; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; -import org.eclipse.osee.coverage.CoverageManager; import org.eclipse.osee.coverage.import01.CoverageImport1TestBlam; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.logging.IHealthStatus; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.logging.SevereLoggingMonitor; +import org.eclipse.osee.framework.skynet.core.rule.OseeHousekeepingRule; +import org.junit.Rule; /** * @author Donald G. Dunne */ public class CoverageManagerTest { + @Rule + public OseeHousekeepingRule hk = new OseeHousekeepingRule(); + private static SevereLoggingMonitor monitorLog; @org.junit.BeforeClass 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 6059b0bcc20..cc6bee7d4b2 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 @@ -117,7 +117,7 @@ public class ConflictTest { */ @org.junit.Test public void testGetMergeBranchCreated() throws Exception { - TestUtil.sleep(5000); + //TestUtil.sleep(5000); SevereLoggingMonitor monitorLog = new SevereLoggingMonitor(); OseeLog.registerLoggerListener(monitorLog); try { @@ -220,11 +220,16 @@ public class ConflictTest { // checkMultipleTxCurrent("attr_id", "osee_attribute"); } + //@formatter:off private static final String NO_TX_CURRENT_SET = - "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 WHERE txs2.gamma_id = t2.gamma_id AND txs2.tx_current != 0"; + "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 " + + "WHERE txs2.gamma_id = t2.gamma_id AND txs2.tx_current != 0"; + //@formatter:on private static final String MULTIPLE_TX_CURRENT_SET = - "SELECT resulttable.branch_id, resulttable.%s, COUNT(resulttable.branch_id) AS numoccurrences FROM (SELECT txs1.branch_id, t1.%s FROM osee_txs txs1, %s t1 WHERE txs1.gamma_id = t1.gamma_id AND txs1.tx_current != 0) resulttable GROUP BY resulttable.branch_id, resulttable.%s HAVING(COUNT(resulttable.branch_id) > 1) order by branch_id"; + "SELECT resulttable.branch_id, resulttable.%s, COUNT(resulttable.branch_id) AS numoccurrences FROM " + "(SELECT txs1.branch_id, t1.%s FROM osee_txs txs1, %s t1 WHERE txs1.gamma_id = t1.gamma_id AND txs1.tx_current != 0) resulttable " + "GROUP BY resulttable.branch_id, resulttable.%s HAVING(COUNT(resulttable.branch_id) > 1) order by branch_id"; private static void checkNoTxCurrent(String dataId, String dataTable) throws OseeCoreException { IOseeStatement chStmt = ConnectionHandler.getStatement(); 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 3931543dc3b..ae594d7d6b9 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 @@ -30,7 +30,7 @@ import org.junit.runners.model.Statement; * In the future the behavior of this class could be modified to clean up after a test, regardless of test's context. *

*/ -public class OseeHousekeepingRule implements MethodRule { +public final class OseeHousekeepingRule implements MethodRule { @Override public Statement apply(final Statement base, final FrameworkMethod method, final Object target) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/util/FrameworkTestUtil.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/util/FrameworkTestUtil.java index daad42f1747..7529f305805 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/util/FrameworkTestUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/util/FrameworkTestUtil.java @@ -17,7 +17,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.List; import org.eclipse.osee.framework.core.data.IArtifactType; @@ -36,7 +35,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.skynet.core.artifact.PurgeArtifacts; import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; -import org.eclipse.osee.support.test.util.TestUtil; /** * @author Donald G. Dunne @@ -67,7 +65,6 @@ public class FrameworkTestUtil { public static void purgeBranch(Branch branch) throws Exception { try { BranchManager.purgeBranch(branch); - TestUtil.sleep(2000); } catch (BranchDoesNotExist ex) { // do nothing } @@ -80,7 +77,7 @@ public class FrameworkTestUtil { for (String branchName : branchNamesContain) { if (workingBranch.getName().contains(branchName)) { BranchManager.purgeBranch(workingBranch); - TestUtil.sleep(2000); + //TestUtil.sleep(2000); } } } @@ -92,24 +89,16 @@ public class FrameworkTestUtil { /** * Deletes all artifacts with names that start with any title given */ - public static void cleanupSimpleTest(IOseeBranch branch, Collection titles) throws Exception { + public static void cleanupSimpleTest(IOseeBranch branch, String... titles) throws Exception { List artifacts = new ArrayList(); for (String title : titles) { artifacts.addAll(ArtifactQuery.getArtifactListFromName(title + "%", branch, EXCLUDE_DELETED)); } if (artifacts.size() > 0) { Operations.executeWorkAndCheckStatus(new PurgeArtifacts(artifacts)); - TestUtil.sleep(4000); } } - /** - * Deletes any artifact with name that starts with title - */ - public static void cleanupSimpleTest(IOseeBranch branch, String title) throws Exception { - cleanupSimpleTest(branch, Arrays.asList(title)); - } - private static List executeCommand(List commands) throws IOException, InterruptedException { List resultStrings = new ArrayList(); ProcessBuilder myProcessBuilder = new ProcessBuilder(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java index 3d8b9d173d5..6322394dfb7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java @@ -352,7 +352,8 @@ public class BranchManager { */ public static Branch createWorkingBranch(TransactionRecord parentTransactionId, String childBranchName, String childBranchGuid, Artifact associatedArtifact) throws OseeCoreException { String creationComment = - "New Branch from " + parentTransactionId.getBranch().getName() + "(" + parentTransactionId.getId() + ")"; + String.format("New Branch from %s (%s)", parentTransactionId.getBranch().getName(), + parentTransactionId.getId()); final String truncatedName = Strings.truncate(childBranchName, 195, true); return createBranch(BranchType.WORKING, parentTransactionId, truncatedName, childBranchGuid, associatedArtifact, diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ReplaceRelationWithBaselineTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ReplaceRelationWithBaselineTest.java index 4249dcccc11..8583ab82c05 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ReplaceRelationWithBaselineTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/ReplaceRelationWithBaselineTest.java @@ -20,39 +20,47 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; +import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction; import org.eclipse.osee.framework.ui.skynet.blam.operation.ReplaceRelationsWithBaselineOperation; import org.eclipse.osee.support.test.util.DemoSawBuilds; import org.junit.Assert; +import org.junit.Rule; +import org.junit.rules.TestName; /** * @author Jeff C. Phillips */ -public class ReplaceRelationWithBaselineTest { +public final class ReplaceRelationWithBaselineTest { + + @Rule + public TestName testName = new TestName(); @org.junit.Test public void testReplaceAttributeVersion() throws Exception { + + String name = ReplaceRelationWithBaselineTest.class.getSimpleName(); + Branch branch = BranchManager.getBranchByGuid(DemoSawBuilds.SAW_Bld_1.getGuid()); Assert.assertNotNull(branch); + SkynetTransaction transaction = new SkynetTransaction(branch, name + ".testReplaceAttributeVersion 1"); Artifact artifact1 = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, branch, "Name1"); Artifact artifact2 = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, branch, "Name2"); - artifact1.addChild(RelationOrderBaseTypes.USER_DEFINED, artifact2); + artifact1.persist(transaction); + transaction.execute(); - artifact1.persist(getClass().getName()); - - Branch childBranch = BranchManager.createWorkingBranch(branch, "Test Child branch", null); - + Branch childBranch = + BranchManager.createWorkingBranch(branch, + String.format("Test Child branch [%s] [%s]", name, testName.getMethodName()), null); + transaction = new SkynetTransaction(childBranch, name + ".testReplaceAttributeVersion 2"); Artifact childArtifact1 = ArtifactQuery.getArtifactFromId(artifact1.getArtId(), childBranch); Artifact childArtifact2 = ArtifactQuery.getArtifactFromId(artifact2.getArtId(), childBranch); - childArtifact1.deleteRelations(CoreRelationTypes.Default_Hierarchical__Child); - + childArtifact1.persist(transaction); childArtifact2.addChild(RelationOrderBaseTypes.USER_DEFINED, childArtifact1); - - childArtifact2.persist(getClass().getName()); - - Assert.assertTrue(childArtifact1.getParent().equals(childArtifact2)); + childArtifact2.persist(transaction); + transaction.execute(); ReplaceRelationsWithBaselineOperation relationsWithBaselineOperation = new ReplaceRelationsWithBaselineOperation(Collections.singleton(childArtifact1)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java index c14a0fc6c14..dd6ac7bdbc7 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/WordEditTest.java @@ -16,7 +16,6 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; -import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.core.resources.IFile; @@ -72,7 +71,7 @@ public class WordEditTest { @After public void tearDown() throws Exception { - FrameworkTestUtil.cleanupSimpleTest(branch, Arrays.asList(ARTIFACT_NAME_1, ARTIFACT_NAME_2)); + FrameworkTestUtil.cleanupSimpleTest(branch, ARTIFACT_NAME_1, ARTIFACT_NAME_2); } @org.junit.Test diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceArtifactWithBaselineOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceArtifactWithBaselineOperation.java index a2bed288c33..57327d0eb16 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceArtifactWithBaselineOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceArtifactWithBaselineOperation.java @@ -43,7 +43,7 @@ public class ReplaceArtifactWithBaselineOperation extends AbstractOperation { this.artifacts = artifacts; } - private SkynetTransaction getTransaction(Branch branch) { + private SkynetTransaction getTransaction(Branch branch) throws OseeCoreException { SkynetTransaction transaction = null; if (transactions == null) { transactions = new HashMap(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/FileSystemRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/FileSystemRenderer.java index f3c009ec903..64db44245fd 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/FileSystemRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/FileSystemRenderer.java @@ -95,8 +95,8 @@ public abstract class FileSystemRenderer extends DefaultArtifactRenderer { IFile file = renderToFile(artifacts, presentationType); if (file != null) { - String dummyName = file.getName(); if (!artifacts.isEmpty()) { + String dummyName = file.getName(); Artifact firstArtifact = artifacts.iterator().next(); try { if (RenderingUtil.arePopupsAllowed()) { -- cgit v1.2.3