mbien commented on PR #7631: URL: https://github.com/apache/netbeans/pull/7631#issuecomment-2267064360
I believe it is safe to say (given the name) that the purpose of the class is delayed evaluation of the full char sequence. My hypothesis is that `charAt` was only implemented since it was required by the interface, `toString` has been overlooked though - since `Object` has a default impl - so this would be plausible. I could be wrong but my guess is that `charAt` is a red hering - the main purpose of this is lazy init. regarding performance, https://github.com/apache/netbeans/blob/03aa32d15aba53f980e095b1a8efa6700c515331/java/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java#L1899 the value is cached, so `toString` should only be called once per item - i am pretty sure I checked this by setting a breakpoint. -- 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
