cancel
Showing results for 
Search instead for 
Did you mean: 

ISSUE - NodeSearcher.java

federicocairo
Champ in-the-making
Champ in-the-making
I found a curious part of Java source code in org.alfresco.repo.search.impl.NodeSearcher.selectNodes() version 3.2 of Alfresco Lab:

nearly row 165

                for(NodeRef node : answer)
                {
                    StringBuffer buffer = new StringBuffer();
                    for (AttributeOrder attOrd : order)
                    {
                        buffer.append(" ").append(nodeService.getProperty(node, attOrd.attribute));
                    }
                }

What's the use of this StringBuffer? Is it useful?
2 REPLIES 2

janv
Employee
Employee
Thanks for the feedback. It looks as if this is left-over 'debug' from the following commit:


Index: projects/repository/source/java/org/alfresco/repo/search/impl/NodeSearcher.java
===================================================================
— projects/repository/source/java/org/alfresco/repo/search/impl/NodeSearcher.java   (revision 2095)
+++ projects/repository/source/java/org/alfresco/repo/search/impl/NodeSearcher.java   (revision 2096)
@@ -157,9 +157,7 @@
                     {
                         buffer.append(" ").append(nodeService.getProperty(node, attOrd.attribute));
                     }
-                    System.out.println(buffer.toString());
                 }
-                System.out.println();
             }
             return answer;
Thanks,
Jan

federicocairo
Champ in-the-making
Champ in-the-making
You're welcome. Regards,
Federico