commit | 9eb55d114a3a3a323cd04867ce1aadfedaf8a394 | [log] [tgz] |
---|---|---|
author | Madan Jampani <madan@onlab.us> | Fri Aug 14 07:47:56 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Fri Aug 14 14:59:06 2015 +0000 |
tree | e109784ecc4123e2fbe3f64bafc359aa6828e79f | |
parent | d29847f404f327689e91063d913d39241826b617 [diff] [blame] |
ONOS-2495: Workaround for the fact that kryo deserialization is not thread safe Change-Id: Id1bd3334f9a5c122984d08f97dbbbf622b27cf33
diff --git a/utils/misc/src/main/java/org/onlab/util/Tools.java b/utils/misc/src/main/java/org/onlab/util/Tools.java index ec6b6da..301f411 100644 --- a/utils/misc/src/main/java/org/onlab/util/Tools.java +++ b/utils/misc/src/main/java/org/onlab/util/Tools.java
@@ -190,6 +190,16 @@ } /** + * Returns a copy of the input byte array. + * + * @param original input + * @return copy of original + */ + public static byte[] copyOf(byte[] original) { + return Arrays.copyOf(original, original.length); + } + + /** * Get property as a string value. * * @param properties properties to be looked up