directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject directory-kerby git commit: Removed some lines in output dumping data.
Date Wed, 09 Dec 2015 02:06:11 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master e3c021050 -> eaa7e75a0


Removed some lines in output dumping data.


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

Branch: refs/heads/master
Commit: eaa7e75a01300595ed0ef53abfd1f7e8135ea21a
Parents: e3c0210
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Wed Dec 9 10:12:21 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Wed Dec 9 10:12:21 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kerby/asn1/parse/Asn1Container.java  | 7 ++++++-
 .../java/org/apache/kerby/asn1/type/Asn1CollectionType.java   | 6 ++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/eaa7e75a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java
----------------------------------------------------------------------
diff --git a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java
index 311f01e..456d6ea 100644
--- a/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java
+++ b/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Container.java
@@ -57,8 +57,13 @@ public class Asn1Container
     public void dumpWith(Asn1Dumper dumper, int indents) {
         dumper.indent(indents).append(toString()).newLine();
 
+        int i = children.size();
         for (Asn1ParseResult aObj : children) {
-            dumper.dumpParseResult(indents + 4, aObj).newLine();
+            dumper.dumpParseResult(indents + 4, aObj);
+            i--;
+            if (i > 0) {
+                dumper.newLine();
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/eaa7e75a/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 8ce0f69..42a1446 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
@@ -122,7 +122,7 @@ public abstract class Asn1CollectionType
             } else {
                 if (parsingItem.isContextSpecific()) {
                     Asn1Binder.bindWithTagging(parsingItem, fieldValue,
-                        fieldInfos[foundPos].getTaggingOption());
+                            fieldInfos[foundPos].getTaggingOption());
                 } else {
                     Asn1Binder.bind(parsingItem, fieldValue);
                 }
@@ -224,9 +224,11 @@ public abstract class Asn1CollectionType
 
             Asn1Type fdValue = fields[i];
             if (fdValue == null || fdValue instanceof Asn1Simple) {
-                dumper.append((Asn1Simple<?>) fdValue).newLine();
+                dumper.append((Asn1Simple<?>) fdValue);
             } else {
                 dumper.newLine().dumpType(indents + 8, fdValue);
+            }
+            if (i < fieldInfos.length - 1) {
                 dumper.newLine();
             }
         }


Mime
View raw message