ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [34/34] ignite git commit: IGNITE-1956: Fixes after merge.
Date Thu, 26 Nov 2015 10:01:55 GMT
IGNITE-1956: Fixes after merge.


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

Branch: refs/heads/ignite-1956
Commit: 2c67cd0fe8af36932e4ffca7870b287916f38d9f
Parents: 45eea77
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Nov 26 13:01:30 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Nov 26 13:01:30 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/portable/BinaryEnumObjectImpl.java      | 2 +-
 .../apache/ignite/internal/portable/BinaryObjectExImpl.java | 5 +++++
 .../apache/ignite/internal/portable/PortableContext.java    | 2 +-
 .../ignite/internal/portable/BinaryEnumsSelfTest.java       | 9 ++++-----
 4 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2c67cd0f/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryEnumObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryEnumObjectImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryEnumObjectImpl.java
index 958ed93..e13c076 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryEnumObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryEnumObjectImpl.java
@@ -39,7 +39,7 @@ import java.nio.ByteBuffer;
 /**
  * Binary enum object.
  */
-public class BinaryEnumObjectImpl implements BinaryObject, Externalizable, CacheObject {
+public class BinaryEnumObjectImpl implements BinaryObjectEx, Externalizable, CacheObject
{
     /** */
     private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/2c67cd0f/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectExImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectExImpl.java
index 7497bd3..2ea71ec 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryObjectExImpl.java
@@ -66,6 +66,11 @@ public abstract class BinaryObjectExImpl implements BinaryObjectEx {
      */
     @Nullable public abstract <F> F field(int fieldId) throws BinaryObjectException;
 
+    /** {@inheritDoc} */
+    @Override public int enumOrdinal() throws BinaryObjectException {
+        throw new BinaryObjectException("Object is not enum.");
+    }
+
     /**
      * Get field by offset.
      *

http://git-wip-us.apache.org/repos/asf/ignite/blob/2c67cd0f/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index 0b0ff3a..cc29e46 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -546,7 +546,7 @@ public class PortableContext implements Externalizable {
         Collection<PortableSchema> schemas = desc.schema() != null ? Collections.singleton(desc.schema())
: null;
 
         metaHnd.addMeta(typeId, 
-            new BinaryMetadata(typeId, typeName, desc.fieldsMeta(), addFieldName, schemas,
desc.isEnum()).wrap(this));
+            new BinaryMetadata(typeId, typeName, desc.fieldsMeta(), affFieldName, schemas,
desc.isEnum()).wrap(this));
 
         // perform put() instead of putIfAbsent() because "registered" flag might have been
changed or class loader
         // might have reloaded described class.

http://git-wip-us.apache.org/repos/asf/ignite/blob/2c67cd0f/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java
index ad1d40b..3bc3922 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/BinaryEnumsSelfTest.java
@@ -25,7 +25,6 @@ import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.BinaryConfiguration;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.marshaller.portable.BinaryMarshaller;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import java.io.Serializable;
@@ -224,8 +223,8 @@ public class BinaryEnumsSelfTest extends GridCommonAbstractTest {
 
         BinaryObject obj = node1.binary().builder("EnumHolder").setField("val", EnumType.ONE).build();
 
-        assert node1.binary().metadata("EnumHolder") != null;
-        assert node1.binary().metadata("EnumType") != null;
+        assert node1.binary().type("EnumHolder") != null;
+        assert node1.binary().type("EnumType") != null;
 
         cacheBinary1.put(1, obj);
 
@@ -406,8 +405,8 @@ public class BinaryEnumsSelfTest extends GridCommonAbstractTest {
     private void validate(BinaryObject obj, EnumType val) {
         assertTrue(obj.type().isEnum());
 
-        assertEquals(node1.binary().typeId(EnumType.class.getName()), obj.typeId());
-        assertEquals(node2.binary().typeId(EnumType.class.getName()), obj.typeId());
+        assertEquals(node1.binary().typeId(EnumType.class.getName()), obj.type().typeId());
+        assertEquals(node2.binary().typeId(EnumType.class.getName()), obj.type().typeId());
 
         assertEquals(val.ordinal(), obj.enumOrdinal());
     }


Mime
View raw message