ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [03/24] incubator-ignite git commit: ignite-630
Date Fri, 24 Jul 2015 10:36:15 GMT
ignite-630


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

Branch: refs/heads/ignite-1139
Commit: c438a763f67ff01d963659536b27f83ebd450a6a
Parents: 1c708d1
Author: avinogradov <avinogradov@gridgain.com>
Authored: Wed Apr 29 16:15:56 2015 +0300
Committer: avinogradov <avinogradov@gridgain.com>
Committed: Wed Apr 29 16:15:56 2015 +0300

----------------------------------------------------------------------
 .../internal/util/lang/GridMetadataAwareAdapter.java      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c438a763/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
index 650c141..134cee9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
@@ -191,9 +191,13 @@ public class GridMetadataAwareAdapter {
      * @return All metadata in this entry.
      */
     public <V> Object[] allMeta() {
+        Object[] cp;
+
         synchronized (mux) {
-            return data;
+            cp = Arrays.copyOf(data, data.length);
         }
+
+        return cp;
     }
 
     /**
@@ -345,7 +349,7 @@ public class GridMetadataAwareAdapter {
 
         // Avoid code warning (suppressing is bad here, because we need this warning for
other places).
         synchronized (mux) {
-            cp = Arrays.copyOf(data, data.length);
+            cp = Arrays.copyOf(this.data, this.data.length);
         }
 
         out.writeObject(cp);
@@ -365,7 +369,7 @@ public class GridMetadataAwareAdapter {
         Object[] cp = (Object[])in.readObject();
 
         synchronized (mux) {
-            data = cp;
+            this.data = cp;
         }
     }
 


Mime
View raw message