@@ -1071,20 +1071,14 @@ else if ( obj instanceof ASN1GraphicString ) {
1071
1071
break ;
1072
1072
}
1073
1073
1074
- if (taggedObj .getTagClass () == BERTags .APPLICATION ) {
1075
- try {
1076
- final ASN1Sequence sequence = (ASN1Sequence ) taggedObj .getBaseUniversal (false , SEQUENCE );
1077
- @ SuppressWarnings ("unchecked" )
1078
- final RubyArray valArr = decodeObjects (context , ASN1 , sequence .getObjects ());
1079
- return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { valArr , tag , tag_class }, Block .NULL_BLOCK );
1080
- } catch (IllegalStateException e ) {
1081
- IRubyObject val = decodeObject (context , ASN1 , taggedObj .getBaseObject ()).callMethod (context , "value" );
1082
- return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { val , tag , tag_class }, Block .NULL_BLOCK );
1083
- }
1084
- } else {
1085
- IRubyObject val = decodeObject (context , ASN1 , taggedObj .getBaseObject ());
1086
- final RubyArray valArr = runtime .newArray (val );
1074
+ try {
1075
+ final ASN1Sequence sequence = (ASN1Sequence ) taggedObj .getBaseUniversal (false , SEQUENCE );
1076
+ @ SuppressWarnings ("unchecked" )
1077
+ final RubyArray valArr = decodeObjects (context , ASN1 , sequence .getObjects ());
1087
1078
return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { valArr , tag , tag_class }, Block .NULL_BLOCK );
1079
+ } catch (IllegalStateException e ) {
1080
+ IRubyObject val = decodeObject (context , ASN1 , taggedObj .getBaseObject ()).callMethod (context , "value" );
1081
+ return ASN1 .getClass ("ASN1Data" ).newInstance (context , new IRubyObject [] { val , tag , tag_class }, Block .NULL_BLOCK );
1088
1082
}
1089
1083
}
1090
1084
0 commit comments