maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r1595642 [2/2] - in /maven/shared/trunk/maven-dependency-tree/src: main/java/org/apache/maven/shared/dependency/graph/ main/java/org/apache/maven/shared/dependency/graph/filter/ main/java/org/apache/maven/shared/dependency/graph/internal/ m...
Date Sun, 18 May 2014 17:32:09 GMT
Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListener.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListener.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListener.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListener.java Sun May 18 17:32:08 2014
@@ -44,7 +44,7 @@ public class DependencyTreeResolutionLis
     implements ResolutionListener, ResolutionListenerForDepMgmt
 {
     // fields -----------------------------------------------------------------
-    
+
     /**
      * The log to write debug messages to.
      */
@@ -69,7 +69,7 @@ public class DependencyTreeResolutionLis
      * The dependency node currently being processed by this listener.
      */
     private DependencyNode currentNode;
-    
+
     /**
      * Map < String replacementId, String premanaged version >
      */
@@ -85,13 +85,12 @@ public class DependencyTreeResolutionLis
     /**
      * Creates a new dependency tree resolution listener that writes to the specified log.
      * 
-     * @param logger
-     *            the log to write debug messages to
+     * @param logger the log to write debug messages to
      */
     public DependencyTreeResolutionListener( Logger logger )
     {
         this.logger = logger;
-        
+
         parentNodes = new Stack<DependencyNode>();
         nodesByArtifact = new IdentityHashMap<Artifact, DependencyNode>();
         rootNode = null;
@@ -114,11 +113,11 @@ public class DependencyTreeResolutionLis
     public void startProcessChildren( Artifact artifact )
     {
         log( "startProcessChildren: artifact=" + artifact );
-        
+
         if ( !currentNode.getArtifact().equals( artifact ) )
         {
             throw new IllegalStateException( "Artifact was expected to be " + currentNode.getArtifact() + " but was "
-                            + artifact );
+                + artifact );
         }
 
         parentNodes.push( currentNode );
@@ -132,7 +131,7 @@ public class DependencyTreeResolutionLis
         DependencyNode node = parentNodes.pop();
 
         log( "endProcessChildren: artifact=" + artifact );
-        
+
         if ( node == null )
         {
             throw new IllegalStateException( "Parent dependency node was null" );
@@ -141,7 +140,7 @@ public class DependencyTreeResolutionLis
         if ( !node.getArtifact().equals( artifact ) )
         {
             throw new IllegalStateException( "Parent dependency node artifact was expected to be " + node.getArtifact()
-                            + " but was " + artifact );
+                + " but was " + artifact );
         }
     }
 
@@ -151,7 +150,7 @@ public class DependencyTreeResolutionLis
     public void includeArtifact( Artifact artifact )
     {
         log( "includeArtifact: artifact=" + artifact );
-        
+
         DependencyNode existingNode = getNode( artifact );
 
         /*
@@ -176,12 +175,12 @@ public class DependencyTreeResolutionLis
     public void omitForNearer( Artifact omitted, Artifact kept )
     {
         log( "omitForNearer: omitted=" + omitted + " kept=" + kept );
-        
+
         if ( !omitted.getDependencyConflictId().equals( kept.getDependencyConflictId() ) )
         {
             throw new IllegalArgumentException( "Omitted artifact dependency conflict id "
-                            + omitted.getDependencyConflictId() + " differs from kept artifact dependency conflict id "
-                            + kept.getDependencyConflictId() );
+                + omitted.getDependencyConflictId() + " differs from kept artifact dependency conflict id "
+                + kept.getDependencyConflictId() );
         }
 
         if ( isCurrentNodeIncluded() )
@@ -200,15 +199,15 @@ public class DependencyTreeResolutionLis
             }
 
             omittedNode.omitForConflict( kept );
-            
+
             /*
              * Add the dependency management information cached in any prior manageArtifact calls, since omitForNearer
              * is always called after manageArtifact.
              */
             flushDependencyManagement( omittedNode );
-            
+
             DependencyNode keptNode = getNode( kept );
-            
+
             if ( keptNode == null )
             {
                 addNode( kept );
@@ -222,7 +221,7 @@ public class DependencyTreeResolutionLis
     public void updateScope( Artifact artifact, String scope )
     {
         log( "updateScope: artifact=" + artifact + ", scope=" + scope );
-        
+
         DependencyNode node = getNode( artifact );
 
         if ( node == null )
@@ -240,14 +239,14 @@ public class DependencyTreeResolutionLis
     public void manageArtifact( Artifact artifact, Artifact replacement )
     {
         // TODO: remove when ResolutionListenerForDepMgmt merged into ResolutionListener
-        
+
         log( "manageArtifact: artifact=" + artifact + ", replacement=" + replacement );
-        
+
         if ( replacement.getVersion() != null )
         {
             manageArtifactVersion( artifact, replacement );
         }
-        
+
         if ( replacement.getScope() != null )
         {
             manageArtifactScope( artifact, replacement );
@@ -260,7 +259,7 @@ public class DependencyTreeResolutionLis
     public void omitForCycle( Artifact artifact )
     {
         log( "omitForCycle: artifact=" + artifact );
-        
+
         if ( isCurrentNodeIncluded() )
         {
             DependencyNode node = createNode( artifact );
@@ -275,7 +274,7 @@ public class DependencyTreeResolutionLis
     public void updateScopeCurrentPom( Artifact artifact, String scopeIgnored )
     {
         log( "updateScopeCurrentPom: artifact=" + artifact + ", scopeIgnored=" + scopeIgnored );
-        
+
         DependencyNode node = getNode( artifact );
 
         if ( node == null )
@@ -315,19 +314,19 @@ public class DependencyTreeResolutionLis
     public void restrictRange( Artifact artifact, Artifact replacement, VersionRange versionRange )
     {
         log( "restrictRange: artifact=" + artifact + ", replacement=" + replacement + ", versionRange=" + versionRange );
-        
+
         // TODO: track range restriction in node (MNG-3093)
     }
-    
+
     // ResolutionListenerForDepMgmt methods -----------------------------------
-    
+
     /**
      * {@inheritDoc}
      */
     public void manageArtifactVersion( Artifact artifact, Artifact replacement )
     {
         log( "manageArtifactVersion: artifact=" + artifact + ", replacement=" + replacement );
-        
+
         /*
          * DefaultArtifactCollector calls manageArtifact twice: first with the change; then subsequently with no change.
          * We ignore the second call when the versions are equal.
@@ -348,7 +347,7 @@ public class DependencyTreeResolutionLis
     public void manageArtifactScope( Artifact artifact, Artifact replacement )
     {
         log( "manageArtifactScope: artifact=" + artifact + ", replacement=" + replacement );
-        
+
         /*
          * DefaultArtifactCollector calls manageArtifact twice: first with the change; then subsequently with no change.
          * We ignore the second call when the scopes are equal.
@@ -362,7 +361,7 @@ public class DependencyTreeResolutionLis
             managedScopes.put( replacement.getId(), artifact.getScope() );
         }
     }
-    
+
     // public methods ---------------------------------------------------------
 
     /**
@@ -387,12 +386,11 @@ public class DependencyTreeResolutionLis
     }
 
     // private methods --------------------------------------------------------
-    
+
     /**
      * Writes the specified message to the log at debug level with indentation for the current node's depth.
      * 
-     * @param message
-     *            the message to write to the log
+     * @param message the message to write to the log
      */
     private void log( String message )
     {
@@ -413,8 +411,7 @@ public class DependencyTreeResolutionLis
     /**
      * Creates a new dependency node for the specified artifact and appends it to the current parent dependency node.
      * 
-     * @param artifact
-     *            the attached artifact for the new dependency node
+     * @param artifact the attached artifact for the new dependency node
      * @return the new dependency node
      */
     private DependencyNode createNode( Artifact artifact )
@@ -430,13 +427,12 @@ public class DependencyTreeResolutionLis
 
         return node;
     }
-    
+
     /**
      * Creates a new dependency node for the specified artifact, appends it to the current parent dependency node and
      * puts it into the dependency node cache.
      * 
-     * @param artifact
-     *            the attached artifact for the new dependency node
+     * @param artifact the attached artifact for the new dependency node
      * @return the new dependency node
      */
     // package protected for unit test
@@ -445,29 +441,27 @@ public class DependencyTreeResolutionLis
         DependencyNode node = createNode( artifact );
 
         DependencyNode previousNode = nodesByArtifact.put( node.getArtifact(), node );
-        
+
         if ( previousNode != null )
         {
             throw new IllegalStateException( "Duplicate node registered for artifact: " + node.getArtifact() );
         }
-        
+
         if ( rootNode == null )
         {
             rootNode = node;
         }
 
         currentNode = node;
-        
+
         return node;
     }
 
     /**
      * Gets the dependency node for the specified artifact from the dependency node cache.
      * 
-     * @param artifact
-     *            the artifact to find the dependency node for
-     * @return the dependency node, or <code>null</code> if the specified artifact has no corresponding dependency
-     *         node
+     * @param artifact the artifact to find the dependency node for
+     * @return the dependency node, or <code>null</code> if the specified artifact has no corresponding dependency node
      */
     private DependencyNode getNode( Artifact artifact )
     {
@@ -477,8 +471,7 @@ public class DependencyTreeResolutionLis
     /**
      * Removes the dependency node for the specified artifact from the dependency node cache.
      * 
-     * @param artifact
-     *            the artifact to remove the dependency node for
+     * @param artifact the artifact to remove the dependency node for
      */
     private void removeNode( Artifact artifact )
     {
@@ -487,7 +480,7 @@ public class DependencyTreeResolutionLis
         if ( !artifact.equals( node.getArtifact() ) )
         {
             throw new IllegalStateException( "Removed dependency node artifact was expected to be " + artifact
-                            + " but was " + node.getArtifact() );
+                + " but was " + node.getArtifact() );
         }
     }
 
@@ -515,27 +508,26 @@ public class DependencyTreeResolutionLis
      * Updates the specified node with any dependency management information cached in prior <code>manageArtifact</code>
      * calls.
      * 
-     * @param node
-     *            the node to update
+     * @param node the node to update
      */
     private void flushDependencyManagement( DependencyNode node )
     {
         Artifact artifact = node.getArtifact();
         String premanagedVersion = managedVersions.get( artifact.getId() );
         String premanagedScope = managedScopes.get( artifact.getId() );
-        
+
         if ( premanagedVersion != null || premanagedScope != null )
         {
             if ( premanagedVersion != null )
             {
                 node.setPremanagedVersion( premanagedVersion );
             }
-            
+
             if ( premanagedScope != null )
             {
                 node.setPremanagedScope( premanagedScope );
             }
-            
+
             premanagedVersion = null;
             premanagedScope = null;
         }

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/AncestorOrSelfDependencyNodeFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/AncestorOrSelfDependencyNodeFilter.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/AncestorOrSelfDependencyNodeFilter.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/AncestorOrSelfDependencyNodeFilter.java Sun May 18 17:32:08 2014
@@ -52,8 +52,7 @@ public class AncestorOrSelfDependencyNod
      * Creates a dependency node filter that only accepts nodes that are ancestors of, or equal to, the specified list
      * of nodes.
      * 
-     * @param descendantNodes
-     *            the list of nodes to accept ancestors-or-self of
+     * @param descendantNodes the list of nodes to accept ancestors-or-self of
      */
     public AncestorOrSelfDependencyNodeFilter( List<DependencyNode> descendantNodes )
     {
@@ -83,12 +82,9 @@ public class AncestorOrSelfDependencyNod
     /**
      * Gets whether the first dependency node is an ancestor-or-self of the second.
      * 
-     * @param ancestorNode
-     *            the ancestor-or-self dependency node
-     * @param descendantNode
-     *            the dependency node to test
-     * @return <code>true</code> if <code>ancestorNode</code> is an ancestor, or equal to,
-     *         <code>descendantNode</code>
+     * @param ancestorNode the ancestor-or-self dependency node
+     * @param descendantNode the dependency node to test
+     * @return <code>true</code> if <code>ancestorNode</code> is an ancestor, or equal to, <code>descendantNode</code>
      */
     private boolean isAncestorOrSelf( DependencyNode ancestorNode, DependencyNode descendantNode )
     {

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/AndDependencyNodeFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/AndDependencyNodeFilter.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/AndDependencyNodeFilter.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/AndDependencyNodeFilter.java Sun May 18 17:32:08 2014
@@ -47,10 +47,8 @@ public class AndDependencyNodeFilter
     /**
      * Creates a dependency node filter that logically ANDs together the two specified dependency node filters.
      * 
-     * @param filter1
-     *            the first dependency node filter to logically AND together
-     * @param filter2
-     *            the second dependency node filter to logically AND together
+     * @param filter1 the first dependency node filter to logically AND together
+     * @param filter2 the second dependency node filter to logically AND together
      */
     public AndDependencyNodeFilter( DependencyNodeFilter filter1, DependencyNodeFilter filter2 )
     {
@@ -60,8 +58,7 @@ public class AndDependencyNodeFilter
     /**
      * Creates a dependency node filter that logically ANDs together the specified dependency node filters.
      * 
-     * @param filters
-     *            the list of dependency node filters to logically AND together
+     * @param filters the list of dependency node filters to logically AND together
      */
     public AndDependencyNodeFilter( List<DependencyNodeFilter> filters )
     {

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/ArtifactDependencyNodeFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/ArtifactDependencyNodeFilter.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/ArtifactDependencyNodeFilter.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/ArtifactDependencyNodeFilter.java Sun May 18 17:32:08 2014
@@ -45,8 +45,7 @@ public class ArtifactDependencyNodeFilte
     /**
      * Creates a dependency node filter that delegates to the specified artifact filter.
      * 
-     * @param filter
-     *            the artifact filter to delegate to
+     * @param filter the artifact filter to delegate to
      */
     public ArtifactDependencyNodeFilter( ArtifactFilter filter )
     {

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/DependencyNodeFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/DependencyNodeFilter.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/DependencyNodeFilter.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/DependencyNodeFilter.java Sun May 18 17:32:08 2014
@@ -33,8 +33,7 @@ public interface DependencyNodeFilter
     /**
      * Gets whether this filter accepts the specified dependency node.
      * 
-     * @param node
-     *            the dependency node to check
+     * @param node the dependency node to check
      * @return <code>true</code> if this filter accepts the specified dependency node
      */
     boolean accept( DependencyNode node );

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/StateDependencyNodeFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/StateDependencyNodeFilter.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/StateDependencyNodeFilter.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/filter/StateDependencyNodeFilter.java Sun May 18 17:32:08 2014
@@ -52,10 +52,8 @@ public class StateDependencyNodeFilter
     /**
      * Creates a dependency node filter that only accepts dependency nodes of the specified state.
      * 
-     * @param state
-     *            the state of dependency nodes to accept
-     * @throws IllegalArgumentException
-     *             if the specified state is invalid
+     * @param state the state of dependency nodes to accept
+     * @throws IllegalArgumentException if the specified state is invalid
      */
     public StateDependencyNodeFilter( int state )
     {

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/BuildingDependencyNodeVisitor.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/BuildingDependencyNodeVisitor.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/BuildingDependencyNodeVisitor.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/BuildingDependencyNodeVisitor.java Sun May 18 17:32:08 2014
@@ -65,8 +65,8 @@ public class BuildingDependencyNodeVisit
      * Creates a dependency node visitor that clones visited nodes into a new dependency tree, and then applies the
      * specified dependency node visitor on the resultant dependency tree.
      * 
-     * @param visitor
-     *            the dependency node visitor to apply on the resultant dependency tree, or <code>null</code> for none
+     * @param visitor the dependency node visitor to apply on the resultant dependency tree, or <code>null</code> for
+     *            none
      */
     public BuildingDependencyNodeVisitor( DependencyNodeVisitor visitor )
     {

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/DependencyNodeVisitor.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/DependencyNodeVisitor.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/DependencyNodeVisitor.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/DependencyNodeVisitor.java Sun May 18 17:32:08 2014
@@ -33,8 +33,7 @@ public interface DependencyNodeVisitor
     /**
      * Starts the visit to the specified dependency node.
      * 
-     * @param node
-     *            the dependency node to visit
+     * @param node the dependency node to visit
      * @return <code>true</code> to visit the specified dependency node's children, <code>false</code> to skip the
      *         specified dependency node's children and proceed to its next sibling
      */
@@ -43,10 +42,9 @@ public interface DependencyNodeVisitor
     /**
      * Ends the visit to to the specified dependency node.
      * 
-     * @param node
-     *            the dependency node to visit
-     * @return <code>true</code> to visit the specified dependency node's next sibling, <code>false</code> to skip
-     *         the specified dependency node's next siblings and proceed to its parent
+     * @param node the dependency node to visit
+     * @return <code>true</code> to visit the specified dependency node's next sibling, <code>false</code> to skip the
+     *         specified dependency node's next siblings and proceed to its parent
      */
     boolean endVisit( DependencyNode node );
 }

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/FilteringDependencyNodeVisitor.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/FilteringDependencyNodeVisitor.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/FilteringDependencyNodeVisitor.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/FilteringDependencyNodeVisitor.java Sun May 18 17:32:08 2014
@@ -50,10 +50,8 @@ public class FilteringDependencyNodeVisi
      * Creates a dependency node visitor that delegates nodes that are accepted by the specified filter to the specified
      * visitor.
      * 
-     * @param visitor
-     *            the dependency node visitor to delegate to
-     * @param filter
-     *            the dependency node filter to apply before delegation
+     * @param visitor the dependency node visitor to delegate to
+     * @param filter the dependency node filter to apply before delegation
      */
     public FilteringDependencyNodeVisitor( DependencyNodeVisitor visitor, DependencyNodeFilter filter )
     {

Modified: maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/SerializingDependencyNodeVisitor.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/SerializingDependencyNodeVisitor.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/SerializingDependencyNodeVisitor.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/traversal/SerializingDependencyNodeVisitor.java Sun May 18 17:32:08 2014
@@ -84,8 +84,8 @@ public class SerializingDependencyNodeVi
     /**
      * The extended ASCII tokens to use when outputing the dependency tree.
      */
-    public static final TreeTokens EXTENDED_TOKENS =
-        new TreeTokens( "\u00c3\u00c4 ", "\u00c0\u00c4 ", "\u00b3  ", "   " );
+    public static final TreeTokens EXTENDED_TOKENS = new TreeTokens( "\u00c3\u00c4 ", "\u00c0\u00c4 ", "\u00b3  ",
+                                                                     "   " );
 
     // fields -----------------------------------------------------------------
 
@@ -109,8 +109,7 @@ public class SerializingDependencyNodeVi
     /**
      * Creates a dependency node visitor that serializes visited nodes to the specified writer using whitespace tokens.
      * 
-     * @param writer
-     *            the writer to serialize to
+     * @param writer the writer to serialize to
      */
     public SerializingDependencyNodeVisitor( Writer writer )
     {
@@ -121,10 +120,8 @@ public class SerializingDependencyNodeVi
      * Creates a dependency node visitor that serializes visited nodes to the specified writer using the specified
      * tokens.
      * 
-     * @param writer
-     *            the writer to serialize to
-     * @param tokens
-     *            the tokens to use when serializing the dependency tree
+     * @param writer the writer to serialize to
+     * @param tokens the tokens to use when serializing the dependency tree
      */
     public SerializingDependencyNodeVisitor( Writer writer, TreeTokens tokens )
     {
@@ -173,8 +170,7 @@ public class SerializingDependencyNodeVi
     /**
      * Writes the necessary tokens to indent the specified dependency node to this visitor's writer.
      * 
-     * @param node
-     *            the dependency node to indent
+     * @param node the dependency node to indent
      */
     private void indent( DependencyNode node )
     {
@@ -192,14 +188,13 @@ public class SerializingDependencyNodeVi
     /**
      * Gets whether the specified dependency node is the last of its siblings.
      * 
-     * @param node
-     *            the dependency node to check
+     * @param node the dependency node to check
      * @return <code>true</code> if the specified dependency node is the last of its last siblings
      */
     private boolean isLast( DependencyNode node )
     {
         // TODO: remove node argument and calculate from visitor calls only
-        
+
         DependencyNode parent = node.getParent();
 
         boolean last;
@@ -221,16 +216,14 @@ public class SerializingDependencyNodeVi
     /**
      * Gets whether the specified dependency node ancestor is the last of its siblings.
      * 
-     * @param node
-     *            the dependency node whose ancestor to check
-     * @param ancestorDepth
-     *            the depth of the ancestor of the specified dependency node to check
+     * @param node the dependency node whose ancestor to check
+     * @param ancestorDepth the depth of the ancestor of the specified dependency node to check
      * @return <code>true</code> if the specified dependency node ancestor is the last of its siblings
      */
     private boolean isLast( DependencyNode node, int ancestorDepth )
     {
         // TODO: remove node argument and calculate from visitor calls only
-        
+
         int distance = depth - ancestorDepth;
 
         while ( distance-- > 0 )

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/AbstractDependencyNodeTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/AbstractDependencyNodeTest.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/AbstractDependencyNodeTest.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/AbstractDependencyNodeTest.java Sun May 18 17:32:08 2014
@@ -55,7 +55,7 @@ public abstract class AbstractDependency
         {
             return null;
         }
-        
+
         String[] tokens = id.split( ":" );
 
         return createArtifact( get( tokens, 0 ), get( tokens, 1 ), get( tokens, 2 ), get( tokens, 3 ), get( tokens, 4 ) );

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/ArtifactMetadataSourceStub.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/ArtifactMetadataSourceStub.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/ArtifactMetadataSourceStub.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/ArtifactMetadataSourceStub.java Sun May 18 17:32:08 2014
@@ -42,9 +42,9 @@ public class ArtifactMetadataSourceStub
     implements ArtifactMetadataSource
 {
     // TODO: move to maven-plugin-testing-harness?
-    
+
     // fields -----------------------------------------------------------------
-    
+
     /**
      * Map of resolution groups by artifact.
      */
@@ -56,7 +56,7 @@ public class ArtifactMetadataSourceStub
     private final Map<Artifact, List<ArtifactVersion>> availableVersionsByArtifact;
 
     // constructors -----------------------------------------------------------
-    
+
     /**
      * Creates a new artifact metadata source stub.
      */
@@ -75,13 +75,13 @@ public class ArtifactMetadataSourceStub
         throws ArtifactMetadataRetrievalException
     {
         ResolutionGroup resolution = resolutionGroupsByArtifact.get( artifact );
-        
+
         // if we return null then the artifact gets excluded in DefaultArtifactCollector
         if ( resolution == null )
         {
             resolution = new ResolutionGroup( artifact, Collections.EMPTY_SET, Collections.EMPTY_LIST );
         }
-        
+
         return resolution;
     }
 
@@ -98,14 +98,12 @@ public class ArtifactMetadataSourceStub
     }
 
     // public methods ---------------------------------------------------------
-    
+
     /**
      * Adds the specified dependency artifacts for the specified artifact to this artifact metadata source stub.
      * 
-     * @param artifact
-     *            the artifact to add metadata to
-     * @param dependencyArtifacts
-     *            the set of artifacts to register as dependencies of the specified artifact
+     * @param artifact the artifact to add metadata to
+     * @param dependencyArtifacts the set of artifacts to register as dependencies of the specified artifact
      */
     public void addArtifactMetadata( Artifact artifact, Set<Artifact> dependencyArtifacts )
     {
@@ -117,10 +115,8 @@ public class ArtifactMetadataSourceStub
     /**
      * Adds versions for the specified artifact to this artifact metadata source stub.
      * 
-     * @param artifact
-     *            the artifact to add metadata to
-     * @param versions
-     *            the list of versions to register as available for the specified artifact
+     * @param artifact the artifact to add metadata to
+     * @param versions the list of versions to register as available for the specified artifact
      */
     public void addAvailableVersions( Artifact artifact, List<ArtifactVersion> versions )
     {

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DefaultDependencyTreeBuilderTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DefaultDependencyTreeBuilderTest.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DefaultDependencyTreeBuilderTest.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DefaultDependencyTreeBuilderTest.java Sun May 18 17:32:08 2014
@@ -112,7 +112,7 @@ public class DefaultDependencyTreeBuilde
      * \- g:a:t:1
      * </pre>
      * 
-     * @throws DependencyTreeBuilderException 
+     * @throws DependencyTreeBuilderException
      */
     public void testProjectWithDependency()
         throws DependencyTreeBuilderException
@@ -190,7 +190,8 @@ public class DefaultDependencyTreeBuilde
         child1ArtifactNode.addChild( transitiveArtifactNode );
         DependencyNode child2ArtifactNode = createNode( "g:b:t:1" );
         expectedRootNode.addChild( child2ArtifactNode );
-        child2ArtifactNode.addChild( createNode( "g:c:t:1", DependencyNode.OMITTED_FOR_DUPLICATE, transitiveArtifactNode.getArtifact() ) );
+        child2ArtifactNode.addChild( createNode( "g:c:t:1", DependencyNode.OMITTED_FOR_DUPLICATE,
+                                                 transitiveArtifactNode.getArtifact() ) );
 
         assertDependencyTree( expectedRootNode, project );
     }
@@ -224,7 +225,8 @@ public class DefaultDependencyTreeBuilde
         expectedRootNode.addChild( nearestArtifactNode );
         DependencyNode childArtifactNode = createNode( "g:b:t:1" );
         expectedRootNode.addChild( childArtifactNode );
-        childArtifactNode.addChild( createNode( "g:a:t:2", DependencyNode.OMITTED_FOR_CONFLICT, nearestArtifactNode.getArtifact() ) );
+        childArtifactNode.addChild( createNode( "g:a:t:2", DependencyNode.OMITTED_FOR_CONFLICT,
+                                                nearestArtifactNode.getArtifact() ) );
 
         assertDependencyTree( expectedRootNode, project );
     }
@@ -258,7 +260,8 @@ public class DefaultDependencyTreeBuilde
         expectedRootNode.addChild( childArtifactNode );
         DependencyNode farthestArtifactNode = createNode( "g:b:t:1" );
         expectedRootNode.addChild( farthestArtifactNode );
-        childArtifactNode.addChild( createNode( "g:b:t:2", DependencyNode.OMITTED_FOR_CONFLICT, farthestArtifactNode.getArtifact() ) );
+        childArtifactNode.addChild( createNode( "g:b:t:2", DependencyNode.OMITTED_FOR_CONFLICT,
+                                                farthestArtifactNode.getArtifact() ) );
 
         assertDependencyTree( expectedRootNode, project );
     }
@@ -293,8 +296,9 @@ public class DefaultDependencyTreeBuilde
         expectedRootNode.addChild( nearestArtifactNode );
         DependencyNode childArtifactNode = createNode( "g:a:t:1" );
         expectedRootNode.addChild( childArtifactNode );
-        childArtifactNode.addChild( createNode( "g:b:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, nearestArtifactNode.getArtifact() ) );
-        
+        childArtifactNode.addChild( createNode( "g:b:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE,
+                                                nearestArtifactNode.getArtifact() ) );
+
         assertDependencyTree( expectedRootNode, project );
     }
 
@@ -326,30 +330,20 @@ public class DefaultDependencyTreeBuilde
         MavenProject project = createProject( projectArtifact, new Artifact[] { childArtifact } );
 
         /*
-         * TODO: Not entirely convinced that the expected tree is correct - I would have expected:
-         * 
-         * <pre>
-         * g:p:t:1
-         * \- g:a:t:1
-         *    +- g:b:t:1
-         *    |  \- (g:c:t:1:compile - omitted for duplicate)
-         *    \- g:c:t:1:compile (scope updated from test)
-         * </pre>
-         * 
+         * TODO: Not entirely convinced that the expected tree is correct - I would have expected: <pre> g:p:t:1 \-
+         * g:a:t:1 +- g:b:t:1 | \- (g:c:t:1:compile - omitted for duplicate) \- g:c:t:1:compile (scope updated from
+         * test) </pre>
          * @see http://www.mail-archive.com/dev@maven.apache.org/msg68011.html
          */
         /*
-        DependencyNode expectedRootNode = createNode( "g:p:t:1" );
-        DependencyNode childArtifactNode = createNode( "g:a:t:1" );
-        expectedRootNode.addChild( childArtifactNode );
-        DependencyNode grandchildArtifactNode = createNode( "g:b:t:1" );
-        childArtifactNode.addChild( grandchildArtifactNode );
-        DependencyNode nearestArtifactNode = createNode( "g:c:t:1:compile" );
-        DependencyNode farthestArtifactNode = createNode( "g:c:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, nearestArtifactNode.getArtifact() );
-        grandchildArtifactNode.addChild( farthestArtifactNode );
-        nearestArtifactNode.setOriginalScope( "test" );
-        childArtifactNode.addChild( nearestArtifactNode );
-        */
+         * DependencyNode expectedRootNode = createNode( "g:p:t:1" ); DependencyNode childArtifactNode = createNode(
+         * "g:a:t:1" ); expectedRootNode.addChild( childArtifactNode ); DependencyNode grandchildArtifactNode =
+         * createNode( "g:b:t:1" ); childArtifactNode.addChild( grandchildArtifactNode ); DependencyNode
+         * nearestArtifactNode = createNode( "g:c:t:1:compile" ); DependencyNode farthestArtifactNode = createNode(
+         * "g:c:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, nearestArtifactNode.getArtifact() );
+         * grandchildArtifactNode.addChild( farthestArtifactNode ); nearestArtifactNode.setOriginalScope( "test" );
+         * childArtifactNode.addChild( nearestArtifactNode );
+         */
 
         DependencyNode expectedRootNode = createNode( "g:p:t:1" );
         DependencyNode childArtifactNode = createNode( "g:a:t:1" );
@@ -358,10 +352,11 @@ public class DefaultDependencyTreeBuilde
         childArtifactNode.addChild( grandchildArtifactNode );
         DependencyNode farthestArtifactNode = createNode( "g:c:t:1:compile" );
         grandchildArtifactNode.addChild( farthestArtifactNode );
-        DependencyNode nearestArtifactNode = createNode( "g:c:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, farthestArtifactNode.getArtifact() );
+        DependencyNode nearestArtifactNode =
+            createNode( "g:c:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, farthestArtifactNode.getArtifact() );
         nearestArtifactNode.setOriginalScope( "test" );
         childArtifactNode.addChild( nearestArtifactNode );
-        
+
         assertDependencyTree( expectedRootNode, project );
     }
 
@@ -393,41 +388,32 @@ public class DefaultDependencyTreeBuilde
         MavenProject project = createProject( projectArtifact, new Artifact[] { childArtifact } );
 
         /*
-         * TODO: Not entirely convinced that the expected tree is correct - I would have expected:
-         * 
-         * <pre>
-         * g:p:t:1
-         * \- g:a:t:1
-         *    +- g:c:t:1:compile (scope updated from test)
-         *    \- g:b:t:1
-         *       \- (g:c:t:1:compile - omitted for duplicate)
+         * TODO: Not entirely convinced that the expected tree is correct - I would have expected: <pre> g:p:t:1 \-
+         * g:a:t:1 +- g:c:t:1:compile (scope updated from test) \- g:b:t:1 \- (g:c:t:1:compile - omitted for duplicate)
          * </pre>
-         * 
          * @see http://www.mail-archive.com/dev@maven.apache.org/msg68011.html
          */
         /*
-        DependencyNode expectedRootNode = createNode( "g:p:t:1" );
-        DependencyNode childArtifactNode = createNode( "g:a:t:1" );
-        expectedRootNode.addChild( childArtifactNode );
-        DependencyNode nearestArtifactNode = createNode( "g:c:t:1:compile" );
-        nearestArtifactNode.setOriginalScope( "test" );
-        childArtifactNode.addChild( nearestArtifactNode );
-        DependencyNode grandchildArtifactNode = createNode( "g:b:t:1" );
-        childArtifactNode.addChild( grandchildArtifactNode );
-        grandchildArtifactNode.addChild( createNode( "g:c:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, nearestArtifactNode.getArtifact() ) );
-        */
-        
+         * DependencyNode expectedRootNode = createNode( "g:p:t:1" ); DependencyNode childArtifactNode = createNode(
+         * "g:a:t:1" ); expectedRootNode.addChild( childArtifactNode ); DependencyNode nearestArtifactNode = createNode(
+         * "g:c:t:1:compile" ); nearestArtifactNode.setOriginalScope( "test" ); childArtifactNode.addChild(
+         * nearestArtifactNode ); DependencyNode grandchildArtifactNode = createNode( "g:b:t:1" );
+         * childArtifactNode.addChild( grandchildArtifactNode ); grandchildArtifactNode.addChild( createNode(
+         * "g:c:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, nearestArtifactNode.getArtifact() ) );
+         */
+
         DependencyNode expectedRootNode = createNode( "g:p:t:1" );
         DependencyNode childArtifactNode = createNode( "g:a:t:1" );
         expectedRootNode.addChild( childArtifactNode );
         DependencyNode farthestArtifactNode = createNode( "g:c:t:1:compile" );
-        DependencyNode nearestArtifactNode = createNode( "g:c:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, farthestArtifactNode.getArtifact() );
+        DependencyNode nearestArtifactNode =
+            createNode( "g:c:t:1:compile", DependencyNode.OMITTED_FOR_DUPLICATE, farthestArtifactNode.getArtifact() );
         nearestArtifactNode.setOriginalScope( "test" );
         childArtifactNode.addChild( nearestArtifactNode );
         DependencyNode grandchildArtifactNode = createNode( "g:b:t:1" );
         childArtifactNode.addChild( grandchildArtifactNode );
         grandchildArtifactNode.addChild( farthestArtifactNode );
-        
+
         assertDependencyTree( expectedRootNode, project );
     }
 
@@ -467,7 +453,7 @@ public class DefaultDependencyTreeBuilde
 
     // TODO: see MNG-3548
     /**
-     * Tests building a tree for a project with a dependency that is duplicated and the version is also fixed in 
+     * Tests building a tree for a project with a dependency that is duplicated and the version is also fixed in
      * dependency management:
      * 
      * <pre>
@@ -481,36 +467,24 @@ public class DefaultDependencyTreeBuilde
      * @throws DependencyTreeBuilderException
      */
     /*
-    public void testProjectWithManagedTransitiveDependencyVersionAndDuplicate() throws DependencyTreeBuilderException
-    {
-        Artifact projectArtifact = createArtifact( "g:p:t:1" );
-        Artifact childArtifact = createArtifact( "g:a:t:1" );
-        Artifact grandchildArtifact = createArtifact( "g:b:t:1" );
-        Artifact farthestTransitiveArtifact = createArtifact( "g:c:t:1" );
-        Artifact nearestTransitiveArtifact = createArtifact( "g:c:t:1" );
-        Artifact managedTransitiveArtifact = createArtifact( "g:c:t:2" );
-        addArtifactMetadata( childArtifact, new Artifact[] { grandchildArtifact, nearestTransitiveArtifact } );
-        addArtifactMetadata( grandchildArtifact, farthestTransitiveArtifact );
-
-        MavenProject project = createProject( projectArtifact, new Artifact[] { childArtifact } );
-        setManagedVersionMap( project, Collections.singleton( managedTransitiveArtifact ) );
-
-        DependencyNode expectedRootNode = createNode( "g:p:t:1" );
-        DependencyNode childArtifactNode = createNode( "g:a:t:1" );
-        expectedRootNode.addChild( childArtifactNode );
-        DependencyNode grandchildArtifactNode = createNode( "g:b:t:2" );
-        childArtifactNode.addChild( grandchildArtifactNode );
-        DependencyNode managedTransitiveArtifactNode = createNode( "g:c:t:2" );
-        managedTransitiveArtifactNode.setPremanagedVersion( "1" );
-        childArtifactNode.addChild( managedTransitiveArtifactNode );
-        DependencyNode omittedManagedTransitiveArtifactNode = createNode( "g:c:t:2" );
-        omittedManagedTransitiveArtifactNode.setPremanagedVersion( "1" );
-        omittedManagedTransitiveArtifactNode.omitForConflict( managedTransitiveArtifact );
-        grandchildArtifactNode.addChild( omittedManagedTransitiveArtifactNode );
-
-        assertDependencyTree( expectedRootNode, project );
-    }
-    */
+     * public void testProjectWithManagedTransitiveDependencyVersionAndDuplicate() throws DependencyTreeBuilderException
+     * { Artifact projectArtifact = createArtifact( "g:p:t:1" ); Artifact childArtifact = createArtifact( "g:a:t:1" );
+     * Artifact grandchildArtifact = createArtifact( "g:b:t:1" ); Artifact farthestTransitiveArtifact = createArtifact(
+     * "g:c:t:1" ); Artifact nearestTransitiveArtifact = createArtifact( "g:c:t:1" ); Artifact managedTransitiveArtifact
+     * = createArtifact( "g:c:t:2" ); addArtifactMetadata( childArtifact, new Artifact[] { grandchildArtifact,
+     * nearestTransitiveArtifact } ); addArtifactMetadata( grandchildArtifact, farthestTransitiveArtifact );
+     * MavenProject project = createProject( projectArtifact, new Artifact[] { childArtifact } ); setManagedVersionMap(
+     * project, Collections.singleton( managedTransitiveArtifact ) ); DependencyNode expectedRootNode = createNode(
+     * "g:p:t:1" ); DependencyNode childArtifactNode = createNode( "g:a:t:1" ); expectedRootNode.addChild(
+     * childArtifactNode ); DependencyNode grandchildArtifactNode = createNode( "g:b:t:2" ); childArtifactNode.addChild(
+     * grandchildArtifactNode ); DependencyNode managedTransitiveArtifactNode = createNode( "g:c:t:2" );
+     * managedTransitiveArtifactNode.setPremanagedVersion( "1" ); childArtifactNode.addChild(
+     * managedTransitiveArtifactNode ); DependencyNode omittedManagedTransitiveArtifactNode = createNode( "g:c:t:2" );
+     * omittedManagedTransitiveArtifactNode.setPremanagedVersion( "1" );
+     * omittedManagedTransitiveArtifactNode.omitForConflict( managedTransitiveArtifact );
+     * grandchildArtifactNode.addChild( omittedManagedTransitiveArtifactNode ); assertDependencyTree( expectedRootNode,
+     * project ); }
+     */
 
     /**
      * Tests building a tree for a project with one transitive dependency whose scope is fixed in dependency management:
@@ -579,7 +553,7 @@ public class DefaultDependencyTreeBuilde
 
         assertDependencyTree( expectedRootNode, project );
     }
-    
+
     /**
      * Tests building a tree for a project with a dependency that has conflicting versions and the version is also fixed
      * in dependency management:
@@ -611,14 +585,14 @@ public class DefaultDependencyTreeBuilde
         expectedRootNode.addChild( nearestArtifactNode );
         DependencyNode childArtifactNode = createNode( "g:b:t:1" );
         expectedRootNode.addChild( childArtifactNode );
-        DependencyNode managedTransitiveArtifactNode = createNode( "g:a:t:3", DependencyNode.OMITTED_FOR_CONFLICT, nearestArtifactNode.getArtifact() );
+        DependencyNode managedTransitiveArtifactNode =
+            createNode( "g:a:t:3", DependencyNode.OMITTED_FOR_CONFLICT, nearestArtifactNode.getArtifact() );
         managedTransitiveArtifactNode.setPremanagedVersion( "2" );
         childArtifactNode.addChild( managedTransitiveArtifactNode );
 
         assertDependencyTree( expectedRootNode, project );
     }
 
-    
     /**
      * Tests building a tree for a project with a dependency with version range
      * 
@@ -627,15 +601,15 @@ public class DefaultDependencyTreeBuilde
      * \- g:a:t:1
      * </pre>
      * 
-     * @throws InvalidVersionSpecificationException 
-     * @throws DependencyTreeBuilderException 
+     * @throws InvalidVersionSpecificationException
+     * @throws DependencyTreeBuilderException
      */
     public void testProjectWithVersionRange()
         throws InvalidVersionSpecificationException, DependencyTreeBuilderException
     {
         String range = "[1,2)";
         Artifact projectArtifact = createArtifact( "g:p:t:1" );
-        Artifact childArtifact = createArtifact( "g:a:t:" + range);
+        Artifact childArtifact = createArtifact( "g:a:t:" + range );
 
         MavenProject project = createProject( projectArtifact, new Artifact[] { childArtifact } );
 
@@ -655,35 +629,26 @@ public class DefaultDependencyTreeBuilde
 
     // TODO: reinstate when MNG-3236 fixed
     /*
-    public void testProjectWithFilter() throws DependencyTreeBuilderException, ArtifactResolutionException
-    {
-        Artifact projectArtifact = createArtifact( "g:p:t:1" );
-        Artifact child1Artifact = createArtifact( "g:a:t:1" );
-        Artifact child2Artifact = createArtifact( "g:b:t:1:test" );
-
-        MavenProject project = createProject( projectArtifact, new Artifact[] { child1Artifact, child2Artifact } );
-
-        DependencyNode expectedRootNode = createNode( "g:p:t:1" );
-        expectedRootNode.addChild( createNode( "g:a:t:1" ) );
-
-        ArtifactFilter artifactFilter = new ScopeArtifactFilter( Artifact.SCOPE_COMPILE );
-        
-        assertDependencyTree( expectedRootNode, project, artifactFilter );
-    }
-    */
+     * public void testProjectWithFilter() throws DependencyTreeBuilderException, ArtifactResolutionException { Artifact
+     * projectArtifact = createArtifact( "g:p:t:1" ); Artifact child1Artifact = createArtifact( "g:a:t:1" ); Artifact
+     * child2Artifact = createArtifact( "g:b:t:1:test" ); MavenProject project = createProject( projectArtifact, new
+     * Artifact[] { child1Artifact, child2Artifact } ); DependencyNode expectedRootNode = createNode( "g:p:t:1" );
+     * expectedRootNode.addChild( createNode( "g:a:t:1" ) ); ArtifactFilter artifactFilter = new ScopeArtifactFilter(
+     * Artifact.SCOPE_COMPILE ); assertDependencyTree( expectedRootNode, project, artifactFilter ); }
+     */
 
     // private methods --------------------------------------------------------
-    
+
     private DependencyNode createNode( String id )
     {
         return createNode( id, DependencyNode.INCLUDED, null );
     }
-    
+
     private DependencyNode createNode( String id, int state, Artifact relatedArtifact )
     {
         return new DependencyNode( createArtifact( id ), state, relatedArtifact );
     }
-    
+
     private Artifact createArtifact( String id )
     {
         String[] tokens = id.split( ":" );
@@ -693,7 +658,7 @@ public class DefaultDependencyTreeBuilde
         String type = get( tokens, 2, "jar" );
         String version = get( tokens, 3 );
         String scope = get( tokens, 4 );
-        
+
         VersionRange versionRange;
         try
         {
@@ -701,12 +666,12 @@ public class DefaultDependencyTreeBuilde
         }
         catch ( InvalidVersionSpecificationException e )
         {
-            throw new RuntimeException(e);
+            throw new RuntimeException( e );
         }
 
         return new DefaultArtifact( groupId, artifactId, versionRange, scope, type, null, new DefaultArtifactHandler() );
     }
-    
+
     private MavenProject createProject( Artifact projectArtifact, Artifact[] dependencyArtifacts )
     {
         MavenProject project = new MavenProject();
@@ -722,43 +687,43 @@ public class DefaultDependencyTreeBuilde
     {
         addArtifactMetadata( artifact, new Artifact[] { dependencyArtifact } );
     }
-    
+
     private void addArtifactMetadata( Artifact artifact, Artifact[] dependencyArtifacts )
     {
         addArtifactMetadata( artifact, new LinkedHashSet<Artifact>( Arrays.asList( dependencyArtifacts ) ) );
     }
-    
+
     private void addArtifactMetadata( Artifact artifact, Set<Artifact> dependencyArtifacts )
     {
         artifactMetadataSource.addArtifactMetadata( artifact, dependencyArtifacts );
     }
-    
+
     private void setManagedVersionMap( MavenProject project, Set<Artifact> managedArtifacts )
     {
         Map<String, Artifact> managedVersionMap = new HashMap<String, Artifact>();
-        
+
         for ( Artifact artifact : managedArtifacts )
         {
             String managementKey = getManagementKey( artifact );
-            
+
             managedVersionMap.put( managementKey, artifact );
         }
 
         project.setManagedVersionMap( managedVersionMap );
     }
-    
+
     private String getManagementKey( Artifact artifact )
     {
         return artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getType()
             + ( artifact.getClassifier() != null ? ":" + artifact.getClassifier() : "" );
     }
-    
+
     private void assertDependencyTree( DependencyNode expectedRootNode, MavenProject project )
         throws DependencyTreeBuilderException
     {
         assertDependencyTree( expectedRootNode, project, null );
     }
-    
+
     private void assertDependencyTree( DependencyNode expectedRootNode, MavenProject project,
                                        ArtifactFilter artifactFilter )
         throws DependencyTreeBuilderException
@@ -777,7 +742,7 @@ public class DefaultDependencyTreeBuilde
 
         assertTreeEquals( expectedRootNode, project, result );
     }
-    
+
     private void assertTreeEquals( DependencyNode dependencyNode, MavenProject project,
                                    ArtifactResolutionResult resolutionResult )
     {
@@ -803,7 +768,7 @@ public class DefaultDependencyTreeBuilde
             throw new AssertionFailedError( buffer.toString() );
         }
     }
-    
+
     private void assertNodesEquals( List<DependencyNode> dependencyNodes, List<ResolutionNode> resolutionNodes )
     {
         assertNodesEquals( dependencyNodes.iterator(), resolutionNodes.iterator() );
@@ -816,10 +781,10 @@ public class DefaultDependencyTreeBuilde
         {
             DependencyNode dependencyNode = dependencyNodesIterator.next();
             ResolutionNode resolutionNode = resolutionNodesIterator.next();
-            
+
             assertNodeEquals( dependencyNode, resolutionNode );
         }
-        
+
         if ( dependencyNodesIterator.hasNext() || resolutionNodesIterator.hasNext() )
         {
             fail( "Node list size differs" );
@@ -829,17 +794,17 @@ public class DefaultDependencyTreeBuilde
     private void assertNodeEquals( DependencyNode dependencyNode, ResolutionNode resolutionNode )
     {
         assertEquals( "Node state", dependencyNode.getState() == DependencyNode.INCLUDED, resolutionNode.isActive() );
-        
+
         assertEquals( "Node artifact", dependencyNode.getArtifact(), resolutionNode.getArtifact() );
-        
+
         assertNodesEquals( dependencyNode.getChildren().iterator(), resolutionNode.getChildrenIterator() );
     }
-    
+
     private String get( String[] array, int index )
     {
         return get( array, index, null );
     }
-    
+
     private String get( String[] array, int index, String defaultValue )
     {
         return ( index < array.length ) ? array[index] : defaultValue;

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DependencyNodeTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DependencyNodeTest.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DependencyNodeTest.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DependencyNodeTest.java Sun May 18 17:32:08 2014
@@ -28,7 +28,7 @@ import org.apache.maven.artifact.Artifac
 
 /**
  * Tests <code>DependencyNode</code>.
- *  
+ * 
  * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
  * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
  * @version $Id$
@@ -45,10 +45,7 @@ public class DependencyNodeTest
         super.setUp();
 
         /*
-         *     ------1------
-         * ----2----       3
-         * 4       5       7
-         *         6
+         * ------1------ ----2---- 3 4 5 7 6
          */
 
         node1 = createNode( 1 );
@@ -95,12 +92,12 @@ public class DependencyNodeTest
         assertNode( it, node1 );
         assertFalse( it.hasNext() );
     }
-    
+
     public void testToNodeStringIncluded()
     {
         Artifact artifact = createArtifact( "g:a:t:1:s" );
         DependencyNode node = new DependencyNode( artifact );
-        
+
         assertEquals( "g:a:t:1:s", node.toNodeString() );
     }
 
@@ -109,7 +106,7 @@ public class DependencyNodeTest
         Artifact artifact = createArtifact( "g:a:t:1:s" );
         DependencyNode node = new DependencyNode( artifact );
         node.setPremanagedVersion( "2" );
-        
+
         assertEquals( "g:a:t:1:s (version managed from 2)", node.toNodeString() );
     }
 
@@ -118,7 +115,7 @@ public class DependencyNodeTest
         Artifact artifact = createArtifact( "g:a:t:1:s" );
         DependencyNode node = new DependencyNode( artifact );
         node.setPremanagedScope( "x" );
-        
+
         assertEquals( "g:a:t:1:s (scope managed from x)", node.toNodeString() );
     }
 
@@ -127,7 +124,7 @@ public class DependencyNodeTest
         Artifact artifact = createArtifact( "g:a:t:1:s" );
         DependencyNode node = new DependencyNode( artifact );
         node.setOriginalScope( "x" );
-        
+
         assertEquals( "g:a:t:1:s (scope updated from x)", node.toNodeString() );
     }
 
@@ -136,7 +133,7 @@ public class DependencyNodeTest
         Artifact artifact = createArtifact( "g:a:t:1:s" );
         Artifact duplicateArtifact = createArtifact( "g:a:t:1:s" );
         DependencyNode node = new DependencyNode( artifact, DependencyNode.OMITTED_FOR_DUPLICATE, duplicateArtifact );
-        
+
         assertEquals( "(g:a:t:1:s - omitted for duplicate)", node.toNodeString() );
     }
 
@@ -146,7 +143,7 @@ public class DependencyNodeTest
         Artifact duplicateArtifact = createArtifact( "g:a:t:1:s" );
         DependencyNode node = new DependencyNode( artifact, DependencyNode.OMITTED_FOR_DUPLICATE, duplicateArtifact );
         node.setOriginalScope( "x" );
-        
+
         assertEquals( "(g:a:t:1:s - scope updated from x; omitted for duplicate)", node.toNodeString() );
     }
 
@@ -154,16 +151,16 @@ public class DependencyNodeTest
     {
         Artifact artifact = createArtifact( "g:a:t:1:s" );
         Artifact conflictArtifact = createArtifact( "g:a:t:2:s" );
-        DependencyNode node = new DependencyNode(artifact, DependencyNode.OMITTED_FOR_CONFLICT, conflictArtifact);
-        
+        DependencyNode node = new DependencyNode( artifact, DependencyNode.OMITTED_FOR_CONFLICT, conflictArtifact );
+
         assertEquals( "(g:a:t:1:s - omitted for conflict with 2)", node.toNodeString() );
     }
 
     public void testToNodeStringOmittedForCycle()
     {
         Artifact artifact = createArtifact( "g:a:t:1:s" );
-        DependencyNode node = new DependencyNode(artifact, DependencyNode.OMITTED_FOR_CYCLE);
-        
+        DependencyNode node = new DependencyNode( artifact, DependencyNode.OMITTED_FOR_CYCLE );
+
         assertEquals( "(g:a:t:1:s - omitted for cycle)", node.toNodeString() );
     }
 
@@ -180,28 +177,28 @@ public class DependencyNodeTest
         assertLine( reader, 3, 1 );
         assertLine( reader, 7, 2 );
     }
-    
+
     public void testOmitForConflict()
     {
         Artifact relatedArtifact = createArtifact( createArtifactId( 2, "3" ) );
         node2.omitForConflict( relatedArtifact );
-        
+
         assertEquals( DependencyNode.OMITTED_FOR_CONFLICT, node2.getState() );
         assertEquals( relatedArtifact, node2.getRelatedArtifact() );
-        
+
         assertTrue( node2.getChildren().isEmpty() );
         assertNull( node4.getParent() );
         assertNull( node5.getParent() );
     }
-    
+
     public void testOmitForConflictWithDuplicate()
     {
         Artifact relatedArtifact = createArtifact( createArtifactId( 2 ) );
         node2.omitForConflict( relatedArtifact );
-        
+
         assertEquals( DependencyNode.OMITTED_FOR_DUPLICATE, node2.getState() );
         assertEquals( relatedArtifact, node2.getRelatedArtifact() );
-        
+
         assertTrue( node2.getChildren().isEmpty() );
         assertNull( node4.getParent() );
         assertNull( node5.getParent() );
@@ -210,14 +207,14 @@ public class DependencyNodeTest
     public void testOmitForCycle()
     {
         node2.omitForCycle();
-        
+
         assertEquals( DependencyNode.OMITTED_FOR_CYCLE, node2.getState() );
-        
+
         assertTrue( node2.getChildren().isEmpty() );
         assertNull( node4.getParent() );
         assertNull( node5.getParent() );
     }
-    
+
     /**
      * @deprecated
      */
@@ -255,9 +252,9 @@ public class DependencyNodeTest
     private DependencyNode createNode( DependencyNode parent, int i )
     {
         DependencyNode node = createNode( i );
-        
+
         parent.addChild( node );
-        
+
         return node;
     }
 
@@ -268,11 +265,11 @@ public class DependencyNodeTest
 
     private String createArtifactId( int i )
     {
-        return createArtifactId( i, Integer.toString( i ) ); 
+        return createArtifactId( i, Integer.toString( i ) );
     }
 
     private String createArtifactId( int i, String version )
     {
-        return "groupId" + i + ":artifactId" + i + ":jar:" + version + ":compile"; 
+        return "groupId" + i + ":artifactId" + i + ":jar:" + version + ":compile";
     }
 }

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListenerTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListenerTest.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListenerTest.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/DependencyTreeResolutionListenerTest.java Sun May 18 17:32:08 2014
@@ -45,7 +45,8 @@ public class DependencyTreeResolutionLis
     /**
      * {@inheritDoc}
      */
-    protected void setUp() throws Exception
+    protected void setUp()
+        throws Exception
     {
         super.setUp();
 
@@ -195,7 +196,8 @@ public class DependencyTreeResolutionLis
         listener.endProcessChildren( projectArtifact );
 
         DependencyNode projectArtifactNode = new DependencyNode( projectArtifact );
-        projectArtifactNode.addChild( new DependencyNode( depArtifact1, DependencyNode.OMITTED_FOR_DUPLICATE, depArtifact2 ) );
+        projectArtifactNode.addChild( new DependencyNode( depArtifact1, DependencyNode.OMITTED_FOR_DUPLICATE,
+                                                          depArtifact2 ) );
         projectArtifactNode.addChild( new DependencyNode( depArtifact2 ) );
 
         assertEquals( projectArtifactNode, listener.getRootNode() );
@@ -232,7 +234,8 @@ public class DependencyTreeResolutionLis
         listener.endProcessChildren( projectArtifact );
 
         DependencyNode projectArtifactNode = new DependencyNode( projectArtifact );
-        DependencyNode depArtifact1Node = new DependencyNode( depArtifact1, DependencyNode.OMITTED_FOR_DUPLICATE, depArtifact2 );
+        DependencyNode depArtifact1Node =
+            new DependencyNode( depArtifact1, DependencyNode.OMITTED_FOR_DUPLICATE, depArtifact2 );
         projectArtifactNode.addChild( depArtifact1Node );
         DependencyNode depArtifact2Node = new DependencyNode( depArtifact2 );
         projectArtifactNode.addChild( depArtifact2Node );

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/ResolutionNodeUtils.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/ResolutionNodeUtils.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/ResolutionNodeUtils.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/ResolutionNodeUtils.java Sun May 18 17:32:08 2014
@@ -42,23 +42,23 @@ import org.apache.maven.project.MavenPro
 public final class ResolutionNodeUtils
 {
     // constructors -----------------------------------------------------------
-    
+
     private ResolutionNodeUtils()
     {
         // private constructor for utility class
     }
 
     // public methods ---------------------------------------------------------
-    
+
     public static List<ResolutionNode> getRootChildrenResolutionNodes( MavenProject project,
                                                                        ArtifactResolutionResult resolutionResult )
     {
         Set<ResolutionNode> resolutionNodes = resolutionResult.getArtifactResolutionNodes();
 
         // obtain root children nodes
-        
+
         Map<Artifact, ResolutionNode> rootChildrenResolutionNodesByArtifact = new HashMap<Artifact, ResolutionNode>();
-        
+
         for ( ResolutionNode resolutionNode : resolutionNodes )
         {
             if ( resolutionNode.isChildOfRootNode() )
@@ -66,31 +66,31 @@ public final class ResolutionNodeUtils
                 rootChildrenResolutionNodesByArtifact.put( resolutionNode.getArtifact(), resolutionNode );
             }
         }
-        
+
         // order root children by project dependencies
-        
+
         List<ResolutionNode> rootChildrenResolutionNodes = new ArrayList<ResolutionNode>();
-        
+
         for ( Iterator<Artifact> iterator = project.getDependencyArtifacts().iterator(); iterator.hasNext(); )
         {
             Artifact artifact = iterator.next();
             ResolutionNode resolutionNode = rootChildrenResolutionNodesByArtifact.get( artifact );
-            
+
             rootChildrenResolutionNodes.add( resolutionNode );
         }
 
         return rootChildrenResolutionNodes;
     }
-    
+
     public static String toString( MavenProject project, ArtifactResolutionResult result )
     {
         StringBuffer buffer = new StringBuffer();
-        
+
         append( buffer, project, result );
-        
+
         return buffer.toString();
     }
-    
+
     public static StringBuffer append( StringBuffer buffer, MavenProject project, ArtifactResolutionResult result )
     {
         ResolutionNode rootNode = new ResolutionNode( project.getArtifact(), Collections.EMPTY_LIST );
@@ -98,21 +98,21 @@ public final class ResolutionNodeUtils
 
         List<ResolutionNode> rootChildrenNodes = getRootChildrenResolutionNodes( project, result );
         append( buffer, rootChildrenNodes.iterator(), 1 );
-        
+
         return buffer;
     }
-    
+
     // private methods --------------------------------------------------------
-    
+
     private static StringBuffer append( StringBuffer buffer, Iterator<ResolutionNode> nodesIterator, int depth )
     {
         while ( nodesIterator.hasNext() )
         {
             ResolutionNode node = nodesIterator.next();
-            
+
             append( buffer, node, depth );
         }
-        
+
         return buffer;
     }
 
@@ -122,15 +122,15 @@ public final class ResolutionNodeUtils
         {
             buffer.append( "   " );
         }
-        
+
         buffer.append( node );
         buffer.append( System.getProperty( "line.separator" ) );
-        
+
         if ( node != null && node.isResolved() )
         {
             append( buffer, node.getChildrenIterator(), depth + 1 );
         }
-        
+
         return buffer;
     }
 }

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/filter/AncestorOrSelfDependencyNodeFilterTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/filter/AncestorOrSelfDependencyNodeFilterTest.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/filter/AncestorOrSelfDependencyNodeFilterTest.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/filter/AncestorOrSelfDependencyNodeFilterTest.java Sun May 18 17:32:08 2014
@@ -53,8 +53,7 @@ public class AncestorOrSelfDependencyNod
         throws Exception
     {
         /*
-         * p -> a -> c
-         *   -> b
+         * p -> a -> c -> b
          */
 
         rootNode = createNode( "g:p:t:1" );

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/traversal/CollectingDependencyNodeVisitorTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/traversal/CollectingDependencyNodeVisitorTest.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/traversal/CollectingDependencyNodeVisitorTest.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/traversal/CollectingDependencyNodeVisitorTest.java Sun May 18 17:32:08 2014
@@ -37,9 +37,9 @@ public class CollectingDependencyNodeVis
     extends AbstractDependencyNodeTest
 {
     // fields -----------------------------------------------------------------
-    
+
     private CollectingDependencyNodeVisitor visitor;
-    
+
     private DependencyNode node1;
 
     private DependencyNode node2;
@@ -47,7 +47,7 @@ public class CollectingDependencyNodeVis
     private DependencyNode node3;
 
     // TestCase methods -------------------------------------------------------
-    
+
     /**
      * {@inheritDoc}
      */
@@ -59,9 +59,9 @@ public class CollectingDependencyNodeVis
         node2 = createNode( "g:b:t:1" );
         node3 = createNode( "g:c:t:1" );
     }
-    
+
     // tests ------------------------------------------------------------------
-    
+
     public void testVisitSingleNode()
     {
         assertEmptyNodes();
@@ -86,17 +86,17 @@ public class CollectingDependencyNodeVis
     }
 
     // private methods --------------------------------------------------------
-    
+
     private void assertEmptyNodes()
     {
-        assertNodes( Collections.<DependencyNode>emptyList() );
+        assertNodes( Collections.<DependencyNode> emptyList() );
     }
-    
+
     private void assertNodes( DependencyNode node )
     {
         assertNodes( Collections.singletonList( node ) );
     }
-    
+
     private void assertNodes( List<DependencyNode> expectedNodes )
     {
         assertEquals( "Collected nodes", expectedNodes, visitor.getNodes() );

Modified: maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/traversal/SerializingDependencyNodeVisitorTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/traversal/SerializingDependencyNodeVisitorTest.java?rev=1595642&r1=1595641&r2=1595642&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/traversal/SerializingDependencyNodeVisitorTest.java (original)
+++ maven/shared/trunk/maven-dependency-tree/src/test/java/org/apache/maven/shared/dependency/tree/traversal/SerializingDependencyNodeVisitorTest.java Sun May 18 17:32:08 2014
@@ -65,47 +65,36 @@ public class SerializingDependencyNodeVi
 
         assertTree( "g:p:t:1" + NEWLINE, rootNode );
     }
-    
+
     public void testNodeWithChild()
     {
         DependencyNode rootNode = createNode( "g:p:t:1" );
         rootNode.addChild( createNode( "g:a:t:1" ) );
 
-        assertTree(
-            "g:p:t:1" + NEWLINE + 
-            "\\- g:a:t:1" + NEWLINE,
-            rootNode );
+        assertTree( "g:p:t:1" + NEWLINE + "\\- g:a:t:1" + NEWLINE, rootNode );
     }
-    
+
     public void testNodeWithMultipleChildren()
     {
         DependencyNode rootNode = createNode( "g:p:t:1" );
         rootNode.addChild( createNode( "g:a:t:1" ) );
         rootNode.addChild( createNode( "g:b:t:1" ) );
         rootNode.addChild( createNode( "g:c:t:1" ) );
-        
-        assertTree(
-            "g:p:t:1" + NEWLINE + 
-            "+- g:a:t:1" + NEWLINE + 
-            "+- g:b:t:1" + NEWLINE + 
-            "\\- g:c:t:1" + NEWLINE,
-            rootNode );
+
+        assertTree( "g:p:t:1" + NEWLINE + "+- g:a:t:1" + NEWLINE + "+- g:b:t:1" + NEWLINE + "\\- g:c:t:1" + NEWLINE,
+                    rootNode );
     }
-    
+
     public void testNodeWithGrandchild()
     {
         DependencyNode rootNode = createNode( "g:p:t:1" );
         DependencyNode childNode = createNode( "g:a:t:1" );
         rootNode.addChild( childNode );
         childNode.addChild( createNode( "g:b:t:1" ) );
-        
-        assertTree(
-            "g:p:t:1" + NEWLINE + 
-            "\\- g:a:t:1" + NEWLINE + 
-            "   \\- g:b:t:1" + NEWLINE,
-            rootNode );
+
+        assertTree( "g:p:t:1" + NEWLINE + "\\- g:a:t:1" + NEWLINE + "   \\- g:b:t:1" + NEWLINE, rootNode );
     }
-    
+
     public void testNodeWithMultipleGrandchildren()
     {
         DependencyNode rootNode = createNode( "g:p:t:1" );
@@ -115,16 +104,11 @@ public class SerializingDependencyNodeVi
         DependencyNode child2Node = createNode( "g:c:t:1" );
         rootNode.addChild( child2Node );
         child2Node.addChild( createNode( "g:d:t:1" ) );
-        
-        assertTree(
-            "g:p:t:1" + NEWLINE + 
-            "+- g:a:t:1" + NEWLINE + 
-            "|  \\- g:b:t:1" + NEWLINE +
-            "\\- g:c:t:1" + NEWLINE + 
-            "   \\- g:d:t:1" + NEWLINE,
-            rootNode );
+
+        assertTree( "g:p:t:1" + NEWLINE + "+- g:a:t:1" + NEWLINE + "|  \\- g:b:t:1" + NEWLINE + "\\- g:c:t:1" + NEWLINE
+            + "   \\- g:d:t:1" + NEWLINE, rootNode );
     }
-    
+
     // private methods --------------------------------------------------------
 
     private void assertTree( String expectedTree, DependencyNode actualNode )



Mime
View raw message