This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch release120 in repository https://gitbox.apache.org/repos/asf/netbeans.git
commit f96a822f957d13ef2735126a7f6b9a80283e3cac Author: Jaroslav Tulach <[email protected]> AuthorDate: Wed Jul 1 09:57:03 2020 +0200 Using StringBuffer as msgs are accessed from multiple threads --- nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ConfigureProxy.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ConfigureProxy.java b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ConfigureProxy.java index 4d96452..eb71bb9 100644 --- a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ConfigureProxy.java +++ b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ConfigureProxy.java @@ -26,8 +26,6 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.net.URLConnection; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CountDownLatch; @@ -84,7 +82,7 @@ public final class ConfigureProxy extends Task { static URLConnection openConnection(Task task, final URL url, URI[] connectedVia) throws IOException { final URLConnection[] conn = { null }; final List<Exception> errs = new CopyOnWriteArrayList<>(); - final StringBuilder msgs = new StringBuilder(); + final StringBuffer msgs = new StringBuffer(); final CountDownLatch connected = new CountDownLatch(1); ExecutorService connectors = Executors.newFixedThreadPool(3); connectors.submit(() -> { @@ -125,7 +123,7 @@ public final class ConfigureProxy extends Task { final URLConnection[] conn, URI[] connectedVia, final CountDownLatch connected, final List<Exception> errs, - StringBuilder msgs + StringBuffer msgs ) { String httpProxy = System.getenv(propertyName); msgs.append("\n[" + propertyName + "] set to " + httpProxy); --------------------------------------------------------------------- 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
