tmysik commented on code in PR #7423:
URL: https://github.com/apache/netbeans/pull/7423#discussion_r1625835619


##########
php/php.editor/src/org/netbeans/modules/php/editor/indent/FormatVisitor.java:
##########
@@ -1136,6 +1139,21 @@ public void visit(ConstantDeclaration node) {
         }
     }
 
+    private int computeConstNodeNameLength(ConstantDeclaration node) {
+        int modifierLength = 0;
+        if (!Modifier.isImplicitPublic(node.getModifier())) {
+            modifierLength = node.getModifierString().length() + " ".length(); 
// NOI18N

Review Comment:
   Here and below - isn't `" ".length()` simply one? I believe that JVM is 
smart enough and new strings are not being created over and over, but still. 
The same applies for `"const ".length()`.
   
   Perhaps we could define these lengths as constants? That could be nicely 
readable, I believe.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to