@@ -1063,21 +1063,18 @@ else if ( obj instanceof ASN1GraphicString ) {
10631063 break ;
10641064 }
10651065
1066- if (taggedObj .getTagClass () == BERTags .APPLICATION ) {
1067- try {
1068- final ASN1Sequence sequence = (ASN1Sequence ) taggedObj .getBaseUniversal (false , SEQUENCE );
1069- @ SuppressWarnings ("unchecked" )
1070- final RubyArray valArr = decodeObjects (context , ASN1 , sequence .getObjects ());
1071- return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { valArr , tag , tag_class }, Block .NULL_BLOCK );
1072- } catch (IllegalStateException e ) {
1073- IRubyObject val = decodeObject (context , ASN1 , taggedObj .getBaseObject ()).callMethod (context , "value" );
1074- return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { val , tag , tag_class }, Block .NULL_BLOCK );
1075- }
1076- } else {
1077- IRubyObject val = decodeObject (context , ASN1 , taggedObj .getBaseObject ());
1078- final RubyArray valArr = runtime .newArray (val );
1066+ try {
1067+ final ASN1Sequence sequence = (ASN1Sequence ) taggedObj .getBaseUniversal (false , SEQUENCE );
1068+ @ SuppressWarnings ("unchecked" )
1069+ final RubyArray valArr = decodeObjects (context , ASN1 , sequence .getObjects ());
1070+ System .out .println ("arrayig" );
10791071 return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { valArr , tag , tag_class }, Block .NULL_BLOCK );
1072+ } catch (IllegalStateException e ) {
1073+ System .out .println ("rolled over" );
1074+ IRubyObject val = decodeObject (context , ASN1 , taggedObj .getBaseObject ()).callMethod (context , "value" );
1075+ return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { val , tag , tag_class }, Block .NULL_BLOCK );
10801076 }
1077+
10811078 }
10821079
10831080 if ( obj instanceof ASN1Sequence ) {
0 commit comments