ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [16/21] ignite git commit: IGNITE-1872: Removed IgniteBinary.builder(int) method as it makes no sense and doesn't allow for correct metadata calculation.
Date Tue, 10 Nov 2015 04:27:42 GMT
IGNITE-1872: Removed IgniteBinary.builder(int) method as it makes no sense and doesn't allow
for correct metadata calculation.


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

Branch: refs/heads/ignite-1753-1282
Commit: 37a2a9fed4d6b465a22b092cfe46d8b8e8560c42
Parents: 303d79e
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Nov 9 13:59:33 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Nov 9 13:59:33 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/IgniteBinary.java  |  8 --------
 .../org/apache/ignite/binary/BinaryObjectBuilder.java  |  1 -
 .../portable/builder/BinaryObjectBuilderImpl.java      | 13 ++++---------
 .../cache/portable/CacheObjectBinaryProcessor.java     |  6 ------
 .../cache/portable/CacheObjectBinaryProcessorImpl.java |  5 -----
 .../processors/cache/portable/IgniteBinaryImpl.java    | 12 ------------
 .../internal/processors/cacheobject/NoOpBinary.java    |  5 -----
 .../portable/GridBinaryObjectBuilderSelfTest.java      |  7 -------
 8 files changed, 4 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/37a2a9fe/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
index 71be821..9c96d3d 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteBinary.java
@@ -308,14 +308,6 @@ public interface IgniteBinary {
     /**
      * Creates new portable builder.
      *
-     * @param typeId ID of the type.
-     * @return Newly portable builder.
-     */
-    public BinaryObjectBuilder builder(int typeId) throws BinaryObjectException;
-
-    /**
-     * Creates new portable builder.
-     *
      * @param typeName Type name.
      * @return Newly portable builder.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/37a2a9fe/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
b/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
index 507b0fc..9fd8420 100644
--- a/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
+++ b/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
@@ -60,7 +60,6 @@ import org.jetbrains.annotations.Nullable;
  * String city = personBinaryObj.getField("address").getField("city");
  * </pre>
  *
- * @see org.apache.ignite.IgniteBinary#builder(int)
  * @see org.apache.ignite.IgniteBinary#builder(String)
  * @see org.apache.ignite.IgniteBinary#builder(BinaryObject)
  */

http://git-wip-us.apache.org/repos/asf/ignite/blob/37a2a9fe/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
index eb4f02c..777d30b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/BinaryObjectBuilderImpl.java
@@ -99,14 +99,6 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder {
     }
 
     /**
-     * @param typeId Type ID.
-     * @param ctx Portable context.
-     */
-    public BinaryObjectBuilderImpl(PortableContext ctx, int typeId) {
-        this(ctx, typeId, null);
-    }
-
-    /**
      * @param typeName Type name.
      * @param ctx Context.
      * @param typeId Type id.
@@ -350,8 +342,11 @@ public class BinaryObjectBuilderImpl implements BinaryObjectBuilder {
                 if (newFldsMetadata != null) {
                     String typeName = this.typeName;
 
-                    if (typeName == null)
+                    if (typeName == null) {
+                        assert metadata != null;
+
                         typeName = metadata.typeName();
+                    }
 
                     ctx.updateMetaData(typeId, typeName, newFldsMetadata);
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/37a2a9fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessor.java
index 7178a94..cac0dcf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessor.java
@@ -32,12 +32,6 @@ import org.jetbrains.annotations.Nullable;
  */
 public interface CacheObjectBinaryProcessor extends IgniteCacheObjectProcessor {
     /**
-     * @param typeId Type ID.
-     * @return Builder.
-     */
-    public BinaryObjectBuilder builder(int typeId);
-
-    /**
      * @param clsName Class name.
      * @return Builder.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/37a2a9fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
index df8e7f9..2b3aa09 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
@@ -552,11 +552,6 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
     }
 
     /** {@inheritDoc} */
-    @Override public BinaryObjectBuilder builder(int typeId) {
-        return new BinaryObjectBuilderImpl(portableCtx, typeId);
-    }
-
-    /** {@inheritDoc} */
     @Override public BinaryObjectBuilder builder(String clsName) {
         return new BinaryObjectBuilderImpl(portableCtx, clsName);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/37a2a9fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java
index 6a93a53..72f4d24 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/IgniteBinaryImpl.java
@@ -71,18 +71,6 @@ public class IgniteBinaryImpl implements IgniteBinary {
     }
 
     /** {@inheritDoc} */
-    @Override public BinaryObjectBuilder builder(int typeId) {
-        guard();
-
-        try {
-            return proc.builder(typeId);
-        }
-        finally {
-            unguard();
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public BinaryObjectBuilder builder(String typeName) {
         guard();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/37a2a9fe/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/NoOpBinary.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/NoOpBinary.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/NoOpBinary.java
index c20f278..5bbc194 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/NoOpBinary.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/NoOpBinary.java
@@ -39,11 +39,6 @@ public class NoOpBinary implements IgniteBinary {
     }
 
     /** {@inheritDoc} */
-    @Override public BinaryObjectBuilder builder(int typeId) throws BinaryObjectException
{
-        throw unsupported();
-    }
-
-    /** {@inheritDoc} */
     @Override public BinaryObjectBuilder builder(String typeName) throws BinaryObjectException
{
         throw unsupported();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/37a2a9fe/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
index 459a7ab..c697510 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridBinaryObjectBuilderSelfTest.java
@@ -971,13 +971,6 @@ public class GridBinaryObjectBuilderSelfTest extends GridCommonAbstractTest
{
     /**
      * @return Builder.
      */
-    private <T> BinaryObjectBuilder builder(int typeId) {
-        return portables().builder(typeId);
-    }
-
-    /**
-     * @return Builder.
-     */
     private <T> BinaryObjectBuilder builder(String clsName) {
         return portables().builder(clsName);
     }


Mime
View raw message