You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sk...@apache.org on 2020/05/27 08:31:17 UTC

[netbeans] branch master updated: [NETBEANS-3858] Checking if the iterator has a next element, before moving to it.

This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new fd48113  [NETBEANS-3858] Checking if the iterator has a next element, before moving to it.
     new a59ca00  Merge pull request #2157 from jlahoda/NETBEANS-3858
fd48113 is described below

commit fd4811301c8bf8879f8505925e3e2ef5a0534ff4
Author: Jan Lahoda <jl...@netbeans.org>
AuthorDate: Tue May 26 20:17:08 2020 +0200

    [NETBEANS-3858] Checking if the iterator has a next element, before moving to it.
---
 .../netbeans/modules/java/source/parsing/ParameterNameProviderImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/ParameterNameProviderImpl.java b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/ParameterNameProviderImpl.java
index efaf35c..3bc125c 100644
--- a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/ParameterNameProviderImpl.java
+++ b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/ParameterNameProviderImpl.java
@@ -208,7 +208,7 @@ public class ParameterNameProviderImpl {
 
     static void capCache(LinkedHashMap<String, ?> map) {
         Iterator<String> it = map.keySet().iterator();
-        while (map.size() > MAX_CACHE_SIZE) {
+        while (map.size() > MAX_CACHE_SIZE && it.hasNext()) {
             it.next();
             it.remove();
         }


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