# sprint-45 trivial coding error in DhtCacheEntry.checkReadersLocked  
(ignite-506)


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

Branch: refs/heads/ignite-release-test-no-mod
Commit: 48cc689fa6dcd9d03b9caeaf2ba448ec5f0f04d3
Parents: e10fb96
Author: sboikov <sboi...@gridgain.com>
Authored: Mon Mar 23 15:03:09 2015 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Mon Mar 23 15:03:09 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/distributed/dht/GridDhtCacheEntry.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/48cc689f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index 23300be..7195d1c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -590,7 +590,7 @@ public class GridDhtCacheEntry extends 
GridDistributedCacheEntry {
      * @return Collection of readers after check.
      * @throws GridCacheEntryRemovedException If removed.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({"unchecked", "ManualArrayToCollectionCopy"})
     protected Collection<ReaderId> checkReadersLocked() throws 
GridCacheEntryRemovedException {
         assert Thread.holdsLock(this);
 
@@ -611,7 +611,7 @@ public class GridDhtCacheEntry extends 
GridDistributedCacheEntry {
                     newRdrs = new ArrayList<>(rdrs.length);
 
                     for (int k = 0; k < i; k++)
-                        newRdrs.add(rdrs[i]);
+                        newRdrs.add(rdrs[k]);
                 }
             }
             // If node is still alive and no failed nodes

Reply via email to