You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by on...@apache.org on 2017/12/20 08:24:16 UTC

[camel] branch master updated: CAMEL-12027 - removal of import org.openmuc.jasn1.ber.BerByteArrayOutputStream from encode method's param and upgrade jasn1

This is an automated email from the ASF dual-hosted git repository.

onders pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 83acd1e  CAMEL-12027 - removal of import org.openmuc.jasn1.ber.BerByteArrayOutputStream from encode method's param and upgrade jasn1
83acd1e is described below

commit 83acd1e61e00cc4f0b5cdd20e0cb5bdea4f80d47
Author: onders86 <on...@gmail.com>
AuthorDate: Tue Dec 19 21:28:48 2017 +0300

    CAMEL-12027 - removal of import org.openmuc.jasn1.ber.BerByteArrayOutputStream from encode method's param and upgrade jasn1
---
 .../main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java  | 6 +++---
 parent/pom.xml                                                      | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/components/camel-asn1/src/main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java b/components/camel-asn1/src/main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java
index 446ea4c..5b2d270 100644
--- a/components/camel-asn1/src/main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java
+++ b/components/camel-asn1/src/main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java
@@ -32,7 +32,7 @@ import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.bouncycastle.asn1.ASN1InputStream;
 import org.bouncycastle.asn1.ASN1Primitive;
-import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
+import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
 
 public class ASN1DataFormat extends ServiceSupport implements DataFormat, DataFormatName {
     private boolean usingIterator;
@@ -87,8 +87,8 @@ public class ASN1DataFormat extends ServiceSupport implements DataFormat, DataFo
     private void encodeGenericTypeObject(Exchange exchange, Class<?> clazz, OutputStream stream)
         throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, IOException {
         Class<?>[] paramOut = new Class<?>[1];
-        paramOut[0] = BerByteArrayOutputStream.class;
-        BerByteArrayOutputStream berOut = new BerByteArrayOutputStream(IOHelper.DEFAULT_BUFFER_SIZE / 256, true);
+        paramOut[0] = OutputStream.class;
+        ReverseByteArrayOutputStream berOut = new ReverseByteArrayOutputStream(IOHelper.DEFAULT_BUFFER_SIZE / 256, true);
         Method encodeMethod = exchange.getIn().getBody().getClass().getDeclaredMethod("encode", paramOut);
         encodeMethod.invoke(exchange.getIn().getBody(), berOut);
         stream.write(berOut.getArray());
diff --git a/parent/pom.xml b/parent/pom.xml
index 69d9690..bac7b3e 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -333,7 +333,7 @@
     <jackrabbit-version>2.16.0</jackrabbit-version>
     <jackrabbit-guava-version>15.0</jackrabbit-guava-version>
     <jain-sip-ri-bundle-version>1.2.154_2</jain-sip-ri-bundle-version>
-    <jasn1-version>1.8.2</jasn1-version>
+    <jasn1-version>1.9.0</jasn1-version>
     <jasper-bundle-version>6.0.44_1</jasper-bundle-version>
     <jasypt-bundle-version>1.9.2_1</jasypt-bundle-version>
     <jasypt-version>1.9.2</jasypt-version>

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].