tmysik commented on code in PR #4037:
URL: https://github.com/apache/netbeans/pull/4037#discussion_r880316129
##########
php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/NamespaceName.java:
##########
@@ -64,6 +70,24 @@ public NamespaceName(int start, int end, List segments,
boolean global, boolean
this.current = current;
}
+ @NonNull
+ public static NamespaceName create(int start, int end, @NonNull String
namespaceName) {
+ boolean isGlobal = namespaceName.startsWith("\\"); // NOI18N
+ boolean isCurrent = namespaceName.startsWith("namespace\\"); // NOI18N
+ String[] names = namespaceName.split("\\\\"); // NOI18N
+ int startSegment = start;
+ List<Identifier> list = new ArrayList<>();
Review Comment:
Nitpick:
```suggestion
List<Identifier> list = new ArrayList<>(names.size());
```
--
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