directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: ASN1. Avoiding the clone of field info array
Date Fri, 04 Dec 2015 12:05:57 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master e1a4c3a31 -> 0a7853dc9


ASN1. Avoiding the clone of field info array


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/0a7853dc
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/0a7853dc
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/0a7853dc

Branch: refs/heads/master
Commit: 0a7853dc9158ace1b00b9a6d876e11ca630ac5a6
Parents: e1a4c3a
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Fri Dec 4 18:43:49 2015 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Fri Dec 4 18:43:49 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/asn1/type/Asn1CollectionType.java  | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/0a7853dc/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java
index 63092a3..a295a59 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1CollectionType.java
@@ -30,15 +30,17 @@ import java.nio.ByteBuffer;
 /**
  * For collection type that may consist of tagged fields
  */
-public abstract class Asn1CollectionType extends AbstractAsn1Type<Asn1CollectionType>
{
-    private Asn1FieldInfo[] fieldInfos;
-    private Asn1Type[] fields;
+public abstract class Asn1CollectionType
+    extends AbstractAsn1Type<Asn1CollectionType> {
+    private final Asn1FieldInfo[] fieldInfos;
+    private final Asn1Type[] fields;
 
-    public Asn1CollectionType(UniversalTag universalTag, Asn1FieldInfo[] fieldInfos) {
+    public Asn1CollectionType(UniversalTag universalTag,
+                              final Asn1FieldInfo[] fieldInfos) {
         super(universalTag);
 
         setValue(this);
-        this.fieldInfos = fieldInfos.clone();
+        this.fieldInfos = fieldInfos;
         this.fields = new Asn1Type[fieldInfos.length];
         usePrimitive(false);
     }


Mime
View raw message