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. Parser results are also Asn1Object
Date Tue, 08 Dec 2015 22:56:21 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 6487cf5bd -> 19f57156c


ASN1. Parser results are also Asn1Object


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

Branch: refs/heads/master
Commit: 19f57156ca0a8b8acaf56261fc20fa9205042133
Parents: 6487cf5
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Wed Dec 9 06:55:40 2015 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Wed Dec 9 06:55:40 2015 +0800

----------------------------------------------------------------------
 .../kerby/asn1/parse/Asn1ParseResult.java       | 37 ++------------------
 .../org/apache/kerby/asn1/type/Asn1Object.java  |  8 ++---
 2 files changed, 7 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/19f57156/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java
index f29c12c..be549ff 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1ParseResult.java
@@ -19,50 +19,19 @@
  */
 package org.apache.kerby.asn1.parse;
 
-import org.apache.kerby.asn1.Tag;
+import org.apache.kerby.asn1.type.Asn1Object;
 import org.apache.kerby.asn1.util.Asn1Util;
 
 import java.nio.ByteBuffer;
 
-public abstract class Asn1ParseResult {
+public abstract class Asn1ParseResult extends Asn1Object {
     protected Asn1Header header;
 
     public Asn1ParseResult(Asn1Header header) {
+        super(header.getTag());
         this.header = header;
     }
 
-    public Tag tag() {
-        return header.getTag();
-    }
-
-    public int tagNo() {
-        return tag().tagNo();
-    }
-
-    public boolean isPrimitive() {
-        return tag().isPrimitive();
-    }
-
-    public boolean isUniversal() {
-        return tag().isUniversal();
-    }
-
-    public boolean isAppSpecific() {
-        return tag().isAppSpecific();
-    }
-
-    public boolean isContextSpecific() {
-        return tag().isContextSpecific();
-    }
-
-    public boolean isTagSpecific() {
-        return tag().isSpecific();
-    }
-
-    public boolean isEOC() {
-        return header.isEOC();
-    }
-
     public Asn1Header getHeader() {
         return header;
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/19f57156/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java
index 9e40eac..643d5d0 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1Object.java
@@ -74,19 +74,19 @@ public abstract class Asn1Object {
     }
 
 
-    protected boolean isUniversal() {
+    public boolean isUniversal() {
         return tag.isUniversal();
     }
 
-    protected boolean isAppSpecific() {
+    public boolean isAppSpecific() {
         return tag.isAppSpecific();
     }
 
-    protected boolean isContextSpecific() {
+    public boolean isContextSpecific() {
         return tag.isContextSpecific();
     }
 
-    protected boolean isTagSpecific() {
+    public boolean isTagSpecific() {
         return tag.isSpecific();
     }
 


Mime
View raw message