Skip to content

Commit eb646df

Browse files
committed
Refactor checkForVersion3 method
1 parent bb265da commit eb646df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkix/src/main/java/org/bouncycastle/cms/CMSSignedDataStreamGenerator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,13 @@ else if (tagged.getTagNo() == 3)
372372
return new ASN1Integer(1);
373373
}
374374

375-
private boolean checkForVersion3(List signerInfos, List signerInfoGens)
375+
private static boolean checkForVersion3(List signerInfos, List signerInfoGens)
376376
{
377377
for (Iterator it = signerInfos.iterator(); it.hasNext();)
378378
{
379-
SignerInfo s = SignerInfo.getInstance(((SignerInformation)it.next()).toASN1Structure());
379+
SignerInfo s = ((SignerInformation)it.next()).toASN1Structure();
380380

381-
if (s.getVersion().intValueExact() == 3)
381+
if (s.getVersion().hasValue(3))
382382
{
383383
return true;
384384
}

0 commit comments

Comments
 (0)