sp-2 minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/89b610c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/89b610c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/89b610c7 Branch: refs/heads/ignite-185 Commit: 89b610c7e7c24ba1d34664b410eba07ba6e1e0e1 Parents: 5027f2b Author: Yakov Zhdanov <yzhda...@gridgain.com> Authored: Fri Feb 20 14:48:31 2015 +0300 Committer: Yakov Zhdanov <yzhda...@gridgain.com> Committed: Fri Feb 20 14:48:31 2015 +0300 ---------------------------------------------------------------------- .../internal/processors/cache/GridCacheUtils.java | 14 ++------------ .../org/apache/ignite/internal/util/IgniteUtils.java | 5 +++-- 2 files changed, 5 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/89b610c7/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 fcf12c8..4dddb59 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 @@ -1778,20 +1778,11 @@ public class GridCacheUtils { }; } - - /* Solely to publish U.getExceptionConverter(clazz) without explicit inheritance. */ - private static class UU extends U { - public static C1<IgniteCheckedException, IgniteException> getExceptionConverter(Class<? extends IgniteCheckedException> clazz) { - return U.getExceptionConverter(clazz); - } - } - /** * @param e Ignite checked exception. * @return Ignite runtime exception. */ - @Nullable - public static CacheException convertToCacheException(IgniteCheckedException e) { + @Nullable public static CacheException convertToCacheException(IgniteCheckedException e) { if (e instanceof CachePartialUpdateCheckedException) return new CachePartialUpdateException((CachePartialUpdateCheckedException)e); else if (e instanceof CacheAtomicUpdateTimeoutCheckedException) @@ -1800,9 +1791,8 @@ public class GridCacheUtils { if (e.getCause() instanceof CacheException) return (CacheException)e.getCause(); - C1<IgniteCheckedException, IgniteException> converter = UU.getExceptionConverter(e.getClass()); + C1<IgniteCheckedException, IgniteException> converter = U.getExceptionConverter(e.getClass()); return converter != null ? new CacheException(converter.apply(e)) : new CacheException(e); } - } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/89b610c7/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 68f654f..8bf43d4 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 @@ -518,10 +518,11 @@ public abstract class IgniteUtils { /** * Gets IgniteClosure for an IgniteCheckedException class. - * @param clazz + * + * @param clazz Class. * @return The IgniteClosure mapped to this exception class, or null if none. */ - protected static C1<IgniteCheckedException, IgniteException> getExceptionConverter(Class<? extends IgniteCheckedException> clazz) { + public static C1<IgniteCheckedException, IgniteException> getExceptionConverter(Class<? extends IgniteCheckedException> clazz) { return exceptionConverters.get(clazz); }