You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2021/01/11 16:32:54 UTC

[netbeans] branch release120 updated: [NETBEANS-4123] PAC evaluator scripts runs just one at a time.

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


The following commit(s) were added to refs/heads/release120 by this push:
     new 58d6772  [NETBEANS-4123] PAC evaluator scripts runs just one at a time.
58d6772 is described below

commit 58d67721f68db3aad7edcffe77062c1e9b3f0e12
Author: Svata Dedic <sv...@oracle.com>
AuthorDate: Thu Jul 16 18:33:06 2020 +0200

    [NETBEANS-4123] PAC evaluator scripts runs just one at a time.
---
 .../netbeans/core/network/proxy/pac/impl/NbPacScriptEvaluator.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/platform/core.network/src/org/netbeans/core/network/proxy/pac/impl/NbPacScriptEvaluator.java b/platform/core.network/src/org/netbeans/core/network/proxy/pac/impl/NbPacScriptEvaluator.java
index 11c97b4..52def8a 100644
--- a/platform/core.network/src/org/netbeans/core/network/proxy/pac/impl/NbPacScriptEvaluator.java
+++ b/platform/core.network/src/org/netbeans/core/network/proxy/pac/impl/NbPacScriptEvaluator.java
@@ -204,7 +204,7 @@ public class NbPacScriptEvaluator implements PacScriptEvaluator {
             resultCache = null;
         }
     }
-
+    
     @Override
     public List<Proxy> findProxyForURL(URI uri) throws PacValidationException {
 
@@ -218,7 +218,10 @@ public class NbPacScriptEvaluator implements PacScriptEvaluator {
             }
         }
         try {
-            Object jsResult = scriptEngine.findProxyForURL(PacUtils.toStrippedURLStr(uri), uri.getHost());
+            Object jsResult;
+            synchronized (scriptEngine) {
+                jsResult = scriptEngine.findProxyForURL(PacUtils.toStrippedURLStr(uri), uri.getHost());
+            }
             jsResultAnalyzed = analyzeResult(uri, jsResult);
             if (canUseURLCaching && (resultCache != null)) {
                 resultCache.put(uri, jsResultAnalyzed);   // save the result in the cache


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

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