This is an automated email from the ASF dual-hosted git repository.
jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new a1d65eb Calling size() makes sure ProxyLookup.LazyCollection gets
immediatelly initialized (which is needed anyway in equals) on JDK11
a1d65eb is described below
commit a1d65ebdacec947beced88046ed99f8cc2418249
Author: Jaroslav Tulach <[email protected]>
AuthorDate: Fri Jan 4 06:51:31 2019 +0100
Calling size() makes sure ProxyLookup.LazyCollection gets immediatelly
initialized (which is needed anyway in equals) on JDK11
---
.../src/org/openide/util/lookup/ProxyLookup.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git
a/platform/openide.util.lookup/src/org/openide/util/lookup/ProxyLookup.java
b/platform/openide.util.lookup/src/org/openide/util/lookup/ProxyLookup.java
index 566de9f..a40bf1a 100644
--- a/platform/openide.util.lookup/src/org/openide/util/lookup/ProxyLookup.java
+++ b/platform/openide.util.lookup/src/org/openide/util/lookup/ProxyLookup.java
@@ -598,14 +598,18 @@ public class ProxyLookup extends Lookup {
if (oldItems != null) {
Collection<? extends Item<T>> newItems = allItems(false);
- if (oldItems.equals(newItems)) {
- modified = false;
+ if (newItems != null && newItems.size() ==
oldItems.size()) {
+ if (oldItems.equals(newItems)) {
+ modified = false;
+ }
}
} else {
if (oldInstances != null) {
Collection newInstances = allInstances(false);
- if (oldInstances.equals(newInstances)) {
- modified = false;
+ if (newInstances != null && newInstances.size() ==
oldInstances.size()) {
+ if (oldInstances.equals(newInstances)) {
+ modified = false;
+ }
}
} else {
Collection<? extends Item<T>> newItems =
allItems(false);
---------------------------------------------------------------------
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