mnemonic-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [2/2] incubator-mnemonic git commit: MNEMONIC-90: String.join() is only supported in Java 8 MNEMONIC-91: Missing the implementation of Iterator.remove()
Date Wed, 10 Aug 2016 18:20:46 GMT
MNEMONIC-90: String.join() is only supported in Java 8
MNEMONIC-91: Missing the implementation of Iterator.remove()


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

Branch: refs/heads/master
Commit: 2d22b745c1f81e8d65ad2dcbf5ee50fb29804323
Parents: a78716d
Author: Wang, Gang(Gary) <gang1.wang@intel.com>
Authored: Wed Aug 10 11:15:12 2016 -0700
Committer: Wang, Gang(Gary) <gang1.wang@intel.com>
Committed: Wed Aug 10 11:15:52 2016 -0700

----------------------------------------------------------------------
 .../org/apache/mnemonic/collections/DurableNodeValue.java    | 8 ++++++++
 mnemonic-core/pom.xml                                        | 5 +++++
 mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java   | 3 ++-
 3 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/2d22b745/mnemonic-collections/src/main/java/org/apache/mnemonic/collections/DurableNodeValue.java
----------------------------------------------------------------------
diff --git a/mnemonic-collections/src/main/java/org/apache/mnemonic/collections/DurableNodeValue.java
b/mnemonic-collections/src/main/java/org/apache/mnemonic/collections/DurableNodeValue.java
index 996fbe0..ed5b83b 100644
--- a/mnemonic-collections/src/main/java/org/apache/mnemonic/collections/DurableNodeValue.java
+++ b/mnemonic-collections/src/main/java/org/apache/mnemonic/collections/DurableNodeValue.java
@@ -168,5 +168,13 @@ public abstract class DurableNodeValue<E> implements Durable, Iterable<E>
{
       next = next.getNext();
       return ret;
     }
+
+    /**
+     * override remove()
+     */
+    @Override
+    public void remove() {
+      throw new UnsupportedOperationException();
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/2d22b745/mnemonic-core/pom.xml
----------------------------------------------------------------------
diff --git a/mnemonic-core/pom.xml b/mnemonic-core/pom.xml
index 123c7c4..4055a8c 100644
--- a/mnemonic-core/pom.xml
+++ b/mnemonic-core/pom.xml
@@ -33,6 +33,11 @@
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>3.4</version>
+    </dependency>
+    <dependency>
       <groupId>org.testng</groupId>
       <artifactId>testng</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/2d22b745/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java
----------------------------------------------------------------------
diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java b/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java
index 2e97a1a..6fa7f3b 100644
--- a/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java
+++ b/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java
@@ -30,6 +30,7 @@ import sun.misc.Unsafe;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ServiceLoader;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.mnemonic.service.allocatorservice.VolatileMemoryAllocatorService;
 import org.apache.mnemonic.service.computingservice.GeneralComputingService;
 import org.apache.mnemonic.service.allocatorservice.NonVolatileMemoryAllocatorService;
@@ -349,7 +350,7 @@ public class Utils {
     for (long[] larr : llarr) {
       slist.add(toInitLiteral(larr));
     }
-    return "{" + String.join(",", slist) + "}";
+    return "{" + StringUtils.join(slist, ",") + "}";
   }
 
   /**


Mime
View raw message