]> source.dussan.org Git - sonarqube.git/commitdiff
change visibility of visitNode (and rename it visitAny)
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 3 Jun 2015 08:14:37 +0000 (10:14 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 3 Jun 2015 08:50:00 +0000 (10:50 +0200)
It will allow to be able to visit any kind of components without the need to implement every visitXXX methods

server/sonar-server/src/main/java/org/sonar/server/computation/component/DepthTraversalTypeAwareVisitor.java

index c368b15bcccd77cd06efc6131c0019ff1ee04734..4f4dc14487000be932c48504a736d4331db63689 100644 (file)
@@ -43,17 +43,17 @@ public abstract class DepthTraversalTypeAwareVisitor implements TypeAwareVisitor
     }
 
     if (order == Order.PRE_ORDER) {
-      visitNode(component);
+      visitAny(component);
     }
 
     visitChildren(component);
 
     if (order == Order.POST_ORDER) {
-      visitNode(component);
+      visitAny(component);
     }
   }
 
-  private void visitNode(Component component) {
+  protected void visitAny(Component component) {
     switch (component.getType()) {
       case PROJECT:
         visitProject(component);