You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vk...@apache.org on 2016/01/26 01:41:34 UTC
ignite git commit: Do not show 'cannot be written in binary format'
warning for JDK classes
Repository: ignite
Updated Branches:
refs/heads/master 1f5b2021c -> d11ed3740
Do not show 'cannot be written in binary format' warning for JDK classes
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d11ed374
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d11ed374
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d11ed374
Branch: refs/heads/master
Commit: d11ed374024b7323bd0ea3606206a94b62ec9dfd
Parents: 1f5b202
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Mon Jan 25 16:41:02 2016 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Mon Jan 25 16:41:02 2016 -0800
----------------------------------------------------------------------
.../internal/binary/BinaryClassDescriptor.java | 32 +++++++++-----------
1 file changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/d11ed374/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
index 1ffa9e5..eb45ac6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
@@ -17,20 +17,6 @@
package org.apache.ignite.internal.binary;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.binary.BinaryIdMapper;
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryReflectiveSerializer;
-import org.apache.ignite.binary.BinarySerializer;
-import org.apache.ignite.binary.Binarylizable;
-import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
-import org.apache.ignite.internal.util.GridUnsafe;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.marshaller.MarshallerExclusions;
-import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
-import org.jetbrains.annotations.Nullable;
-import sun.misc.Unsafe;
-
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -47,6 +33,19 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.binary.BinaryIdMapper;
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.BinaryReflectiveSerializer;
+import org.apache.ignite.binary.BinarySerializer;
+import org.apache.ignite.binary.Binarylizable;
+import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
+import org.apache.ignite.internal.util.GridUnsafe;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.marshaller.MarshallerExclusions;
+import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
+import org.jetbrains.annotations.Nullable;
+import sun.misc.Unsafe;
/**
* Binary class descriptor.
@@ -55,9 +54,6 @@ public class BinaryClassDescriptor {
/** */
public static final Unsafe UNSAFE = GridUnsafe.unsafe();
- /** Apache Ignite base package name. */
- private static final String OAI_PKG = "org.apache.ignite";
-
/** */
private final BinaryContext ctx;
@@ -176,7 +172,7 @@ public class BinaryClassDescriptor {
mode = serializer != null ? BinaryWriteMode.BINARY : BinaryUtils.mode(cls);
}
- if (useOptMarshaller && userType && !cls.getName().startsWith(OAI_PKG)) {
+ if (useOptMarshaller && userType && !U.isIgnite(cls) && !U.isJdk(cls)) {
U.quietAndWarn(ctx.log(), "Class \"" + cls.getName() + "\" cannot be serialized using " +
BinaryMarshaller.class.getSimpleName() + " because it either implements Externalizable interface " +
"or have writeObject/readObject methods. " + OptimizedMarshaller.class.getSimpleName() + " will be " +