Repository: ignite
Updated Branches:
  refs/heads/ignite-3199-1 097dc1b10 -> b718bba55


Fix off-by-one and warning


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

Branch: refs/heads/ignite-3199-1
Commit: 218bef755cc2c1761282314153b0d2117a50e52b
Parents: 097dc1b
Author: Pavel Tupitsyn <[email protected]>
Authored: Tue Sep 13 14:31:15 2016 +0300
Committer: Pavel Tupitsyn <[email protected]>
Committed: Tue Sep 13 14:31:15 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/platform/PlatformProcessorImpl.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/218bef75/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java
index 52e682b..a617a8d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java
@@ -548,7 +548,7 @@ public class PlatformProcessorImpl extends 
GridProcessorAdapter implements Platf
                     maxExtId = cacheExt.id();
             }
 
-            PlatformCacheExtension[] res = new 
PlatformCacheExtension[maxExtId];
+            PlatformCacheExtension[] res = new PlatformCacheExtension[maxExtId 
+ 1];
 
             for (PlatformCacheExtension cacheExt : cacheExts)
                 res[cacheExt.id()]= cacheExt;
@@ -556,6 +556,7 @@ public class PlatformProcessorImpl extends 
GridProcessorAdapter implements Platf
             return res;
         }
         else
+            //noinspection ZeroLengthArrayAllocation
             return new PlatformCacheExtension[0];
     }
 

Reply via email to