http://git-wip-us.apache.org/repos/asf/ignite/blob/9a6cfce6/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
----------------------------------------------------------------------
diff --git 
a/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
 
b/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
index b1c269b..c87f08f 100644
--- 
a/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
+++ 
b/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
@@ -506,7 +506,7 @@ public class CacheHibernateBlobStore<K, V> extends 
CacheStoreAdapter<K, V> {
      * @throws IgniteCheckedException If failed to convert.
      */
     protected byte[] toBytes(Object obj) throws IgniteCheckedException {
-        return marsh.marshal(obj);
+        return U.marshal(marsh, obj);
     }
 
     /**
@@ -521,7 +521,7 @@ public class CacheHibernateBlobStore<K, V> extends 
CacheStoreAdapter<K, V> {
         if (bytes == null || bytes.length == 0)
             return null;
 
-        return marsh.unmarshal(bytes, getClass().getClassLoader());
+        return U.unmarshal(marsh, bytes, getClass().getClassLoader());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a6cfce6/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 0b0fe85..a5f283e 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1553,13 +1553,13 @@ public class IgniteH2Indexing implements 
GridQueryIndexing {
     protected JavaObjectSerializer h2Serializer() {
         return new JavaObjectSerializer() {
                 @Override public byte[] serialize(Object obj) throws Exception 
{
-                    return marshaller.marshal(obj);
+                    return U.marshal(marshaller, obj);
                 }
 
                 @Override public Object deserialize(byte[] bytes) throws 
Exception {
                     ClassLoader clsLdr = ctx != null ? 
U.resolveClassLoader(ctx.config()) : null;
 
-                    return marshaller.unmarshal(bytes, clsLdr);
+                    return U.unmarshal(marshaller, bytes, clsLdr);
                 }
             };
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a6cfce6/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventDeserializer.java
----------------------------------------------------------------------
diff --git 
a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventDeserializer.java
 
b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventDeserializer.java
index 47ce1ca..3bcf5fb 100644
--- 
a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventDeserializer.java
+++ 
b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventDeserializer.java
@@ -20,6 +20,7 @@ package org.apache.ignite.stream.kafka.connect.serialization;
 import java.util.Map;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.events.CacheEvent;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.marshaller.Marshaller;
 import org.apache.ignite.marshaller.jdk.JdkMarshaller;
 import org.apache.kafka.common.errors.SerializationException;
@@ -40,7 +41,7 @@ public class CacheEventDeserializer implements 
Deserializer<CacheEvent> {
     /** {@inheritDoc} */
     @Override public CacheEvent deserialize(String topic, byte[] bytes) {
         try {
-            return marsh.unmarshal(bytes, getClass().getClassLoader());
+            return U.unmarshal(marsh, bytes, getClass().getClassLoader());
         }
         catch (IgniteCheckedException e) {
             throw new SerializationException("Failed to deserialize cache 
event!", e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a6cfce6/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventSerializer.java
----------------------------------------------------------------------
diff --git 
a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventSerializer.java
 
b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventSerializer.java
index 2f2d668..bc09256 100644
--- 
a/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventSerializer.java
+++ 
b/modules/kafka/src/main/java/org/apache/ignite/stream/kafka/connect/serialization/CacheEventSerializer.java
@@ -20,6 +20,7 @@ package org.apache.ignite.stream.kafka.connect.serialization;
 import java.util.Map;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.events.CacheEvent;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.marshaller.Marshaller;
 import org.apache.ignite.marshaller.jdk.JdkMarshaller;
 import org.apache.kafka.common.errors.SerializationException;
@@ -40,7 +41,7 @@ public class CacheEventSerializer implements 
Serializer<CacheEvent> {
     /** {@inheritDoc} */
     @Override public byte[] serialize(String topic, CacheEvent event) {
         try {
-            return marsh.marshal(event);
+            return U.marshal(marsh, event);
         }
         catch (IgniteCheckedException e) {
             throw new SerializationException("Failed to serialize cache 
event!", e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a6cfce6/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
----------------------------------------------------------------------
diff --git 
a/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
 
b/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
index b6540b2..83ad186 100644
--- 
a/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
+++ 
b/modules/web/src/main/java/org/apache/ignite/cache/websession/WebSessionV2.java
@@ -21,6 +21,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.internal.websession.WebSessionEntity;
 import org.apache.ignite.marshaller.Marshaller;
 import org.jetbrains.annotations.Nullable;
@@ -82,7 +83,7 @@ class WebSessionV2 implements HttpSession {
     private boolean invalidated;
 
     /** Grid marshaller. */
-    private final Marshaller marshaller;
+    private final Marshaller marsh;
 
     /** Original session to delegate invalidation. */
     private final HttpSession genuineSes;
@@ -91,15 +92,18 @@ class WebSessionV2 implements HttpSession {
      * @param id Session ID.
      * @param ses Session.
      * @param isNew Is new flag.
+     * @param ctx Servlet context.
+     * @param entity Entity.
+     * @param marsh Marshaller.
      */
     WebSessionV2(final String id, final @Nullable HttpSession ses, final 
boolean isNew, final ServletContext ctx,
-        @Nullable WebSessionEntity entity, final Marshaller marshaller) {
+        @Nullable WebSessionEntity entity, final Marshaller marsh) {
         assert id != null;
-        assert marshaller != null;
+        assert marsh != null;
         assert ctx != null;
         assert ses != null || entity != null;
 
-        this.marshaller = marshaller;
+        this.marsh = marsh;
         this.ctx = ctx;
         this.isNew = isNew;
         this.genuineSes = ses;
@@ -331,9 +335,9 @@ class WebSessionV2 implements HttpSession {
      * @throws IOException If unarshaling failed.
      */
     @Nullable private <T> T unmarshal(final byte[] bytes) throws IOException {
-        if (marshaller != null) {
+        if (marsh != null) {
             try {
-                return marshaller.unmarshal(bytes, 
getClass().getClassLoader());
+                return U.unmarshal(marsh, bytes, getClass().getClassLoader());
             }
             catch (IgniteCheckedException e) {
                 throw new IOException(e);
@@ -351,9 +355,9 @@ class WebSessionV2 implements HttpSession {
      * @throws IOException If marshaling failed.
      */
     @Nullable private byte[] marshal(final Object obj) throws IOException {
-        if (marshaller != null) {
+        if (marsh != null) {
             try {
-                return marshaller.marshal(obj);
+                return U.marshal(marsh, obj);
             }
             catch (IgniteCheckedException e) {
                 throw new IOException(e);

Reply via email to