You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/04/01 12:02:03 UTC
[32/50] incubator-ignite git commit: # ignite-sprint-3 avoid
StringIndexOutOfBoundsException (ignite-657)
# ignite-sprint-3 avoid StringIndexOutOfBoundsException (ignite-657)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e182c34b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e182c34b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e182c34b
Branch: refs/heads/ignite-291
Commit: e182c34bde3321f7fb8e9af471bc0dfa2a938f65
Parents: 07683c9
Author: sboikov <sb...@gridgain.com>
Authored: Tue Mar 31 15:34:05 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Mar 31 15:34:05 2015 +0300
----------------------------------------------------------------------
.../cache/transactions/IgniteTxLocalAdapter.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e182c34b/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 ca85838..e552619 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
@@ -3067,17 +3067,20 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
if (!cctx.txCompatible(this, activeCacheIds, cacheCtx)) {
StringBuilder cacheNames = new StringBuilder();
+ int idx = 0;
+
for (Integer activeCacheId : activeCacheIds) {
cacheNames.append(cctx.cacheContext(activeCacheId).name());
- cacheNames.append(", ");
+ if (idx++ < activeCacheIds.size() - 1)
+ cacheNames.append(", ");
}
- cacheNames.setLength(cacheNames.length() - 2);
-
throw new IgniteCheckedException("Failed to enlist new cache to existing transaction " +
- "(cache configurations are not compatible) [activeCaches=[" + cacheNames +
- "], cacheName=" + cacheCtx.name() + ", txSystem=" + system() +
+ "(cache configurations are not compatible) [" +
+ "activeCaches=[" + cacheNames + "]" +
+ ", cacheName=" + cacheCtx.name() +
+ ", txSystem=" + system() +
", cacheSystem=" + cacheCtx.system() + ']');
}
else