Author: rob.stryker(a)jboss.com
Date: 2008-03-26 19:37:42 -0400 (Wed, 26 Mar 2008)
New Revision: 7140
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveModelNode.java
Log:
Fixing a unit test
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveModelNode.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveModelNode.java 2008-03-26
22:57:08 UTC (rev 7139)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveModelNode.java 2008-03-26
23:37:42 UTC (rev 7140)
@@ -173,15 +173,19 @@
ArrayList<IPath> list = new ArrayList<IPath>();
IArchiveNode[] children = getChildren(IArchiveNode.TYPE_ARCHIVE);
IArchive child;
+ IPath p;
for( int i = 0; i < children.length; i++ ) {
child = (IArchive)children[i];
- if( child.getGlobalDestinationPath() != null ) {
- IPath p = child.getGlobalDestinationPath().append(child.getName());
- if( list.contains(p))
- return false;
- else
- list.add(p);
- }
+
+ if( child.getGlobalDestinationPath() != null )
+ p = child.getGlobalDestinationPath().append(child.getName());
+ else
+ p = child.getDestinationPath().append(child.getName());
+
+ if( list.contains(p))
+ return false;
+ else
+ list.add(p);
}
return super.validateModel();
Show replies by date