You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/12/04 21:01:34 UTC

[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #2579: Avoid to call add/addAll on a potentially unmodified collection

matthiasblaesing commented on a change in pull request #2579:
URL: https://github.com/apache/netbeans/pull/2579#discussion_r536377177



##########
File path: platform/core.network/src/org/netbeans/core/network/proxy/NbProxySelector.java
##########
@@ -145,7 +145,7 @@ public NbProxySelector() {
             case ProxySettings.AUTO_DETECT_PAC:
                 if (useSystemProxies ()) {
                     if (original != null) {
-                        res = original.select(uri);                   
+                        res = new ArrayList<>(original.select(uri));

Review comment:
       Minimal nitpick: The other branches of the conditional add their result to the list, that is initialized in line 66. Would it be an option to use the same approach here? If not, this is ok, just indicate so.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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