diff --git a/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/translator/AbstractOctetStringTranslator.java b/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/translator/AbstractOctetStringTranslator.java index 5cc23cf..1fe3972 100644 --- a/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/translator/AbstractOctetStringTranslator.java +++ b/mts-asn1-core/src/main/java/com/ericsson/mts/asn1/translator/AbstractOctetStringTranslator.java @@ -51,9 +51,7 @@ public final void encode(String name, BitArray s, FormatReader reader, Translato } else { BitArray bitArray = new BitArray(); constraints.getContentTranslator().encode(name, bitArray, reader, translatorContext); - if (!bitArray.getLength().mod(BigInteger.valueOf(8)).equals(BigInteger.ZERO)) { - throw new RuntimeException("specification error ! X.682 : 11.4.a)"); - } + bitArray.skipAlignedBits(); doEncode(s, reader, bitArray.getBinaryMessage()); } }