ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [11/11] ignite git commit: IGNITE-2264: Added "strict" semantics where necessary.
Date Sun, 03 Jan 2016 20:17:27 GMT
IGNITE-2264: Added "strict" semantics where necessary.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/48374c26
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/48374c26
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/48374c26

Branch: refs/heads/ignite-2264
Commit: 48374c26b9a960164d976be2c86fed026f3df21c
Parents: c29ebe4
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Sun Jan 3 23:42:32 2016 +0400
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Sun Jan 3 23:42:32 2016 +0400

----------------------------------------------------------------------
 .../igfs/IgfsPerBlockLruEvictionPolicy.java       |  2 +-
 .../ignite/internal/GridTaskSessionImpl.java      |  8 ++++----
 .../internal/binary/BinaryReaderHandles.java      |  2 +-
 .../managers/discovery/GridDiscoveryManager.java  |  8 ++++----
 .../processors/cache/GridCacheEntrySet.java       |  2 +-
 .../processors/cache/GridCacheMvccManager.java    |  2 +-
 .../internal/processors/cache/GridCacheUtils.java |  4 ++--
 .../cache/GridCacheValueCollection.java           |  2 +-
 .../cache/affinity/GridCacheAffinityImpl.java     |  2 +-
 .../dht/GridDhtPartitionTopologyImpl.java         |  2 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java   | 18 +++++++++---------
 .../distributed/dht/GridPartitionedGetFuture.java |  2 +-
 .../dht/atomic/GridDhtAtomicCache.java            |  8 ++++----
 .../cache/distributed/near/GridNearGetFuture.java |  2 +-
 .../cache/local/atomic/GridLocalAtomicCache.java  |  6 +++---
 .../cache/transactions/IgniteTxLocalAdapter.java  |  2 +-
 .../cache/transactions/IgniteTxManager.java       |  2 +-
 .../processors/clock/GridClockDeltaSnapshot.java  |  4 ++--
 .../internal/processors/igfs/IgfsAttributes.java  |  2 +-
 .../processors/igfs/IgfsDeleteWorker.java         |  2 +-
 .../ignite/internal/processors/igfs/IgfsImpl.java |  2 +-
 .../processors/igfs/IgfsInputStreamImpl.java      |  2 +-
 .../internal/processors/igfs/IgfsMetaManager.java |  2 +-
 .../processors/igfs/IgfsModeResolver.java         |  2 +-
 .../PlatformBalancingMultiClosureTask.java        |  2 +-
 .../PlatformBalancingSingleClosureTask.java       |  2 +-
 .../PlatformBroadcastingMultiClosureTask.java     |  2 +-
 .../PlatformBroadcastingSingleClosureTask.java    |  2 +-
 .../apache/ignite/internal/util/IgniteUtils.java  |  5 ++---
 .../ignite/internal/util/lang/GridFunc.java       |  2 +-
 .../spi/deployment/local/LocalDeploymentSpi.java  |  2 +-
 31 files changed, 53 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/cache/eviction/igfs/IgfsPerBlockLruEvictionPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/igfs/IgfsPerBlockLruEvictionPolicy.java
b/modules/core/src/main/java/org/apache/ignite/cache/eviction/igfs/IgfsPerBlockLruEvictionPolicy.java
index 73bfce0..178f342 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/igfs/IgfsPerBlockLruEvictionPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/igfs/IgfsPerBlockLruEvictionPolicy.java
@@ -312,7 +312,7 @@ public class IgfsPerBlockLruEvictionPolicy implements EvictionPolicy<IgfsBlockKe
             Collection<String> excludePaths0 = excludePaths;
 
             if (excludePaths0 != null) {
-                excludePatterns0 = U.newHashSet(excludePaths0.size());
+                excludePatterns0 = U.newHashSetStrict(excludePaths0.size());
 
                 for (String excludePath : excludePaths0) {
                     try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
index 6ead990..61a8d94 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
@@ -160,7 +160,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
         this.ctx = ctx;
 
         if (attrs != null && !attrs.isEmpty()) {
-            this.attrs = U.newHashMap(attrs.size());
+            this.attrs = U.newHashMapStrict(attrs.size());
 
             this.attrs.putAll(attrs);
         }
@@ -363,7 +363,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
             if (closed)
                 throw new InterruptedException("Session was closed: " + this);
 
-            Map<Object, Object> retVal = U.newHashMap(keys.size());
+            Map<Object, Object> retVal = U.newHashMapStrict(keys.size());
 
             if (attrs != null)
                 for (Object key : keys)
@@ -555,7 +555,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
         // will happen in 'setInternal(...)' method.
         synchronized (mux) {
             if (this.attrs == null)
-                this.attrs = U.newHashMap(attrs.size());
+                this.attrs = U.newHashMapStrict(attrs.size());
 
             this.attrs.putAll(attrs);
         }
@@ -594,7 +594,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
 
         synchronized (mux) {
             if (this.attrs == null)
-                this.attrs = U.newHashMap(attrs.size());
+                this.attrs = U.newHashMapStrict(attrs.size());
 
             this.attrs.putAll(attrs);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
index bd4aa6c..88d59b2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderHandles.java
@@ -86,7 +86,7 @@ public class BinaryReaderHandles {
                 break;
 
             case MODE_SINGLE:
-                Map<Integer, Object> newData = U.newHashMap(3);
+                Map<Integer, Object> newData = U.newHashMapStrict(3);
 
                 newData.put(singlePos, data);
                 newData.put(pos, obj);

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 27ff7bb..c9532a4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -2469,9 +2469,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
 
             allNodes = Collections.unmodifiableList(all);
 
-            Map<String, Collection<ClusterNode>> cacheMap = U.newHashMap(allNodes.size());
-            Map<String, Collection<ClusterNode>> rmtCacheMap = U.newHashMap(allNodes.size());
-            Map<String, Collection<ClusterNode>> dhtNodesMap = U.newHashMap(allNodes.size());
+            Map<String, Collection<ClusterNode>> cacheMap = U.newHashMapStrict(allNodes.size());
+            Map<String, Collection<ClusterNode>> rmtCacheMap = U.newHashMapStrict(allNodes.size());
+            Map<String, Collection<ClusterNode>> dhtNodesMap = U.newHashMapStrict(allNodes.size());
             Collection<ClusterNode> nodesWithCaches = U.newHashSet(allNodes.size());
             Collection<ClusterNode> rmtNodesWithCaches = U.newHashSet(allNodes.size());
 
@@ -2578,7 +2578,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
             daemonNodes = Collections.unmodifiableList(new ArrayList<>(
                 F.view(F.concat(false, loc, rmts), F.not(daemonFilter))));
 
-            Map<UUID, ClusterNode> nodeMap = U.newHashMap(allNodes().size() + daemonNodes.size());
+            Map<UUID, ClusterNode> nodeMap = U.newHashMapStrict(allNodes().size() +
daemonNodes.size());
 
             for (ClusterNode n : F.concat(false, allNodes(), daemonNodes()))
                 nodeMap.put(n.id(), n);

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntrySet.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntrySet.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntrySet.java
index 634a97e..dad0130 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntrySet.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntrySet.java
@@ -50,7 +50,7 @@ public class GridCacheEntrySet<K, V> extends AbstractSet<Cache.Entry<K,
V>> {
      */
     public GridCacheEntrySet(GridCacheContext<K, V> ctx, Collection<? extends Cache.Entry<K,
V>> c,
         @Nullable IgnitePredicate<Cache.Entry<K, V>>... filter) {
-        set = U.newHashSet(c.size());
+        set = U.newHashSetStrict(c.size());
 
         assert ctx != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
index def5659..0897c1df 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
@@ -1209,7 +1209,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter
{
         /** {@inheritDoc} */
         @Override public String toString() {
             if (!pendingLocks.isEmpty()) {
-                Map<GridCacheVersion, IgniteInternalTx> txs = U.newHashMap(1);
+                Map<GridCacheVersion, IgniteInternalTx> txs = U.newHashMapStrict(1);
 
                 for (Collection<GridCacheMvccCandidate> cands : pendingLocks.values())
                     for (GridCacheMvccCandidate c : cands)

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index c905e3e..1695507 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1858,7 +1858,7 @@ public class GridCacheUtils {
      * @return Neighbors map.
      */
     public static Map<UUID, Collection<ClusterNode>> neighbors(Collection<ClusterNode>
topSnapshot) {
-        Map<String, Collection<ClusterNode>> macMap = U.newHashMap(topSnapshot.size());
+        Map<String, Collection<ClusterNode>> macMap = U.newHashMapStrict(topSnapshot.size());
 
         // Group by mac addresses.
         for (ClusterNode node : topSnapshot) {
@@ -1872,7 +1872,7 @@ public class GridCacheUtils {
             nodes.add(node);
         }
 
-        Map<UUID, Collection<ClusterNode>> neighbors = U.newHashMap(topSnapshot.size());
+        Map<UUID, Collection<ClusterNode>> neighbors = U.newHashMapStrict(topSnapshot.size());
 
         for (Collection<ClusterNode> group : macMap.values())
             for (ClusterNode node : group)

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
index 231ba46..f13b6f5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueCollection.java
@@ -55,7 +55,7 @@ public class GridCacheValueCollection<K, V> extends GridSerializableCollection<V
      */
     public GridCacheValueCollection(GridCacheContext<K, V> ctx, Collection<? extends
Cache.Entry<K, V>> c,
         @Nullable IgnitePredicate<Cache.Entry<K, V>>[] filter) {
-        map = U.newHashMap(c.size());
+        map = U.newHashMapStrict(c.size());
 
         assert ctx != null;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
index 9384c3a..ec1f747 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
@@ -173,7 +173,7 @@ public class GridCacheAffinityImpl<K, V> implements Affinity<K>
{
         int nodesCnt = cctx.discovery().cacheAffinityNodes(cctx.name(), topVer).size();
 
         // Must return empty map if no alive nodes present or keys is empty.
-        Map<ClusterNode, Collection<K>> res = U.newHashMap(nodesCnt);
+        Map<ClusterNode, Collection<K>> res = U.newHashMapStrict(nodesCnt);
 
         for (K key : keys) {
             ClusterNode primary = cctx.affinity().primary(key, topVer);

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index 5685f9e..dc13fdc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -932,7 +932,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology
{
 
             node2part = partMap;
 
-            Map<Integer, Set<UUID>> p2n = U.newHashMap(cctx.affinity().partitions());
+            Map<Integer, Set<UUID>> p2n = U.newHashMapStrict(cctx.affinity().partitions());
 
             for (Map.Entry<UUID, GridDhtPartitionMap2> e : partMap.entrySet()) {
                 for (Integer p : e.getValue().keySet()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index d43cd05..23fdbf5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -388,11 +388,11 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
 
                             boolean modified = false;
 
-                            for (T2<EntryProcessor<Object, Object, Object>, Object[]>
t : txEntry.entryProcessors()) {
-                                CacheInvokeEntry<Object, Object> invokeEntry = new
CacheInvokeEntry<>(
-                                    txEntry.context(), key, val, txEntry.cached().version(),
txEntry.keepBinary());
+                             for (T2<EntryProcessor<Object, Object, Object>, Object[]>
t : txEntry.entryProcessors()) {
+                                 CacheInvokeEntry<Object, Object> invokeEntry = new
CacheInvokeEntry<>(
+                                     txEntry.context(), key, val, txEntry.cached().version(),
txEntry.keepBinary());
 
-                                try {
+                                 try {
                                     EntryProcessor<Object, Object, Object> processor
= t.get1();
 
                                     procRes = processor.process(invokeEntry, t.get2());
@@ -405,7 +405,7 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
                                     break;
                                 }
 
-                                modified |= invokeEntry.modified();
+                                 modified |= invokeEntry.modified();
                             }
 
                             if (modified)
@@ -1230,10 +1230,10 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
                                 if (entry.explicitVersion() == null) {
                                     GridCacheMvccCandidate added = entry.cached().candidate(version());
 
-                                    assert added != null : "Null candidate for non-group-lock
entry " +
-                                        "[added=" + added + ", entry=" + entry + ']';
-                                    assert added.dhtLocal() : "Got non-dht-local candidate
for prepare future" +
-                                        "[added=" + added + ", entry=" + entry + ']';
+                                assert added != null : "Null candidate for non-group-lock
entry " +
+                                    "[added=" + added + ", entry=" + entry + ']';
+                                assert added.dhtLocal() : "Got non-dht-local candidate for
prepare future" +
+                                    "[added=" + added + ", entry=" + entry + ']';
 
                                     if (added != null && added.ownerVersion() !=
null)
                                         req.owned(entry.txKey(), added.ownerVersion());

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index 2600943..3d5fd85 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -486,7 +486,7 @@ public class GridPartitionedGetFuture<K, V> extends CacheDistributedGetFutureAda
                 LinkedHashMap<KeyCacheObject, Boolean> old = mappings.get(node);
 
                 if (old == null)
-                    mappings.put(node, old = U.newLinkedHashMap(3));
+                    mappings.put(node, old = U.newLinkedHashMapStrict(3));
 
                 old.put(key, false);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 4293838..cf73c6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1642,7 +1642,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
                         }
 
                         if (putMap == null) {
-                            putMap = U.newLinkedHashMap(size);
+                            putMap = U.newLinkedHashMapStrict(size);
                             writeVals = new ArrayList<>(size);
                         }
 
@@ -1687,7 +1687,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
                     assert updated != null;
 
                     if (putMap == null) {
-                        putMap = U.newLinkedHashMap(size);
+                        putMap = U.newLinkedHashMapStrict(size);
                         writeVals = new ArrayList<>(size);
                     }
 
@@ -1782,7 +1782,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
 
             if (val == null) {
                 if (needReload == null)
-                    needReload = U.newHashMap(entries.size());
+                    needReload = U.newHashMapStrict(entries.size());
 
                 needReload.put(entry.key(), i);
             }
@@ -2415,7 +2415,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
             for (GridCacheMapEntry entry : locked) {
                 if (entry != null && entry.deleted()) {
                     if (skip == null)
-                        skip = U.newHashSet(locked.size());
+                        skip = U.newHashSetStrict(locked.size());
 
                     skip.add(entry.key());
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 6f0285e..625cc83 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -608,7 +608,7 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
                     LinkedHashMap<KeyCacheObject, Boolean> old = mappings.get(affNode);
 
                     if (old == null)
-                        mappings.put(affNode, old = U.newLinkedHashMap(3));
+                        mappings.put(affNode, old = U.newLinkedHashMapStrict(3));
 
                     old.put(key, addRdr);
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index 760aefb..3c85e42 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -559,7 +559,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
         UUID subjId = ctx.subjectIdPerCall(null, opCtx);
 
-        Map<K, V> vals = U.newHashMap(keys.size());
+        Map<K, V> vals = U.newHashMapStrict(keys.size());
 
         if (keyCheck)
             validateCacheKeys(keys);
@@ -1231,7 +1231,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
                             }
 
                             if (putMap == null) {
-                                putMap = U.newLinkedHashMap(size);
+                                putMap = U.newLinkedHashMapStrict(size);
                                 writeVals = new ArrayList<>(size);
                             }
 
@@ -1267,7 +1267,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
                         }
 
                         if (putMap == null) {
-                            putMap = U.newLinkedHashMap(size);
+                            putMap = U.newLinkedHashMapStrict(size);
                             writeVals = new ArrayList<>(size);
                         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 166cb86..42edd8f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -735,7 +735,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
 
                             if (writeStore.isWriteThrough()) {
                                 if (putMap == null)
-                                    putMap = U.newLinkedHashMap(writeMap().size());
+                                    putMap = U.newLinkedHashMapStrict(writeMap().size());
 
                                 putMap.put(key, F.<Object, GridCacheVersion>t(val,
ver));
                             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index fbacb54..6983d8e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -1706,7 +1706,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
                 }
 
                 if (processedVers == null)
-                    processedVers = U.newHashSet(txNum);
+                    processedVers = U.newHashSetStrict(txNum);
 
                 processedVers.add(tx.xidVersion());
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
index a343494..5f6d6ce 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshot.java
@@ -59,9 +59,9 @@ public class GridClockDeltaSnapshot {
 
         this.ver = ver;
 
-        deltas = U.newHashMap(discoSnap.topologyNodes().size());
+        deltas = U.newHashMapStrict(discoSnap.topologyNodes().size());
 
-        pendingDeltas = U.newHashMap(discoSnap.topologyNodes().size());
+        pendingDeltas = U.newHashMapStrict(discoSnap.topologyNodes().size());
 
         for (ClusterNode n : discoSnap.topologyNodes()) {
             if (!locNodeId.equals(n.id()))

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
index 3f562f1..31a329b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAttributes.java
@@ -180,7 +180,7 @@ public class IgfsAttributes implements Externalizable {
         if (in.readBoolean()) {
             int size = in.readInt();
 
-            pathModes = U.newHashMap(size);
+            pathModes = U.newHashMapStrict(size);
 
             for (int i = 0; i < size; i++)
                 pathModes.put(U.readString(in), IgfsMode.fromOrdinal(in.readByte()));

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
index 1ad8916..7f17aa8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteWorker.java
@@ -270,7 +270,7 @@ public class IgfsDeleteWorker extends IgfsThread {
                 if (listing.isEmpty())
                     return true; // Directory is empty.
 
-                final Map<String, IgfsListingEntry> delListing = U.newHashMap(MAX_DELETE_BATCH);
+                final Map<String, IgfsListingEntry> delListing = U.newHashMapStrict(MAX_DELETE_BATCH);
 
                 final GridCompoundFuture<Object, ?> fut = new GridCompoundFuture<>();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
index 5add384..8d3c332 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
@@ -213,7 +213,7 @@ public final class IgfsImpl implements IgfsEx {
             dfltMode = cfg.getDefaultMode();
 
         Map<String, IgfsMode> cfgModes = new LinkedHashMap<>();
-        Map<String, IgfsMode> dfltModes = U.newLinkedHashMap(4);
+        Map<String, IgfsMode> dfltModes = U.newLinkedHashMapStrict(4);
 
         if (cfg.isInitializeDefaultPathModes()) {
             dfltModes.put("/ignite/primary", PRIMARY);

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsInputStreamImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsInputStreamImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsInputStreamImpl.java
index 8a0eeb5..a531554 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsInputStreamImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsInputStreamImpl.java
@@ -141,7 +141,7 @@ public class IgfsInputStreamImpl extends IgfsInputStreamAdapter {
 
         maxLocCacheSize = (prefetchBlocks > 0 ? prefetchBlocks : 1) * 3 / 2;
 
-        locCache = U.newLinkedHashMap(maxLocCacheSize);
+        locCache = U.newLinkedHashMapStrict(maxLocCacheSize);
 
         pendingFuts = new GridConcurrentHashSet<>(prefetchBlocks > 0 ? prefetchBlocks
: 1);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
index 5e4756f..6bceb82 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java
@@ -1382,7 +1382,7 @@ public class IgfsMetaManager extends IgfsManager {
                     // Ensure parent is still in place.
                     if (parentInfo != null) {
                         Map<String, IgfsListingEntry> newListing =
-                            U.newHashMap(parentInfo.listing().size());
+                            U.newHashMapStrict(parentInfo.listing().size());
 
                         newListing.putAll(parentInfo.listing());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolver.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolver.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolver.java
index aab90ee..4803b94 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolver.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolver.java
@@ -123,7 +123,7 @@ public class IgfsModeResolver {
             Set<IgfsMode> children = childrenModesCache.get(path);
 
             if (children == null) {
-                children = U.newHashSet(IgfsMode.values().length);
+                children = U.newHashSetStrict(IgfsMode.values().length);
 
                 IgfsMode pathDefault = dfltMode;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
index 648aecb..cd5b468 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingMultiClosureTask.java
@@ -63,7 +63,7 @@ public class PlatformBalancingMultiClosureTask extends PlatformAbstractTask
{
         assert !F.isEmpty(jobs) : "Jobs emptiness must be checked in native platform.";
 
         if (!F.isEmpty(subgrid)) {
-            Map<ComputeJob, ClusterNode> map = U.newHashMap(jobs.size());
+            Map<ComputeJob, ClusterNode> map = U.newHashMapStrict(jobs.size());
 
             for (PlatformJob job : jobs)
                 map.put(job, lb.getBalancedNode(job, null));

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
index a207a5c..629a38f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBalancingSingleClosureTask.java
@@ -62,7 +62,7 @@ public class PlatformBalancingSingleClosureTask extends PlatformAbstractTask
{
         assert job != null : "Job null-check must be performed in native platform.";
 
         if (!F.isEmpty(subgrid)) {
-            Map<ComputeJob, ClusterNode> map = U.newHashMap(11);
+            Map<ComputeJob, ClusterNode> map = U.newHashMapStrict(11);
 
             map.put(job, lb.getBalancedNode(job, null));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
index 227cf4c..81f172c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingMultiClosureTask.java
@@ -56,7 +56,7 @@ public class PlatformBroadcastingMultiClosureTask extends PlatformAbstractTask
{
         assert !F.isEmpty(jobs) : "Jobs emptiness must be checked in native platform.";
 
         if (!F.isEmpty(subgrid)) {
-            Map<ComputeJob, ClusterNode> map = U.newHashMap(jobs.size() * subgrid.size());
+            Map<ComputeJob, ClusterNode> map = U.newHashMapStrict(jobs.size() * subgrid.size());
 
             for (PlatformJob job : jobs) {
                 boolean first = true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
index ab82521..2666f74 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java
@@ -55,7 +55,7 @@ public class PlatformBroadcastingSingleClosureTask extends PlatformAbstractTask
         assert job != null : "Job null-check must be performed in native platform.";
 
         if (!F.isEmpty(subgrid)) {
-            Map<ComputeJob, ClusterNode> map = U.newHashMap(subgrid.size());
+            Map<ComputeJob, ClusterNode> map = U.newHashMapStrict(subgrid.size());
 
             boolean first = true;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index f3d7f00..0e96527 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -5024,8 +5024,7 @@ public abstract class IgniteUtils {
         if (size == -1)
             return null;
 
-        /// TODO: CAREFUL!
-        LinkedHashMap<K, V> map = U.newLinkedHashMap(size);
+        LinkedHashMap<K, V> map = U.newLinkedHashMapStrict(size);
 
         for (int i = 0; i < size; i++)
             map.put((K)in.readObject(), (V)in.readObject());
@@ -9107,7 +9106,7 @@ public abstract class IgniteUtils {
      * @param size Expected size.
      * @return New map.
      */
-    public static <K, V> HashMap<K, V> newLinkedHashMapStrict(int size) {
+    public static <K, V> LinkedHashMap<K, V> newLinkedHashMapStrict(int size)
{
         return new LinkedHashMap<>(size, 1.0f);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
index 7175446..bc868a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
@@ -3044,7 +3044,7 @@ public class GridFunc {
     public static <K, V> Map<K, V> zip(Collection<? extends K> keys, V
dfltVal) {
         A.notNull(keys, "keys");
 
-        Map<K, V> m = U.newHashMap(keys.size());
+        Map<K, V> m = U.newHashMapStrict(keys.size());
 
         for (K k : keys)
             m.put(k, dfltVal);

http://git-wip-us.apache.org/repos/asf/ignite/blob/48374c26/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
index 62ff304..3681b9c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java
@@ -230,7 +230,7 @@ public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSp
 
         // Maps resources to classes.
         // Map may contain 2 entries for one class.
-        Map<String, String> regRsrcs = U.newHashMap(2);
+        Map<String, String> regRsrcs = U.newHashMapStrict(2);
 
         // Check alias collision for added classes.
         String alias = null;


Mime
View raw message