@@ -178,7 +178,7 @@ public PGPPublicKey(PublicKeyPacket publicKeyPacket, KeyFingerPrintCalculator fi
178178 this .idSigs = new ArrayList <List <PGPSignature >>(pubKey .idSigs .size ());
179179 for (int i = 0 ; i != pubKey .idSigs .size (); i ++)
180180 {
181- this .idSigs .add (new ArrayList <PGPSignature >(pubKey .idSigs .get (i )));
181+ this .idSigs .add (new ArrayList <PGPSignature >(( List < PGPSignature >) pubKey .idSigs .get (i )));
182182 }
183183
184184 if (pubKey .subSigs != null )
@@ -345,7 +345,7 @@ private long getExpirationTimeFromSig(
345345
346346 while (signatures .hasNext ())
347347 {
348- PGPSignature sig = signatures .next ();
348+ PGPSignature sig = ( PGPSignature ) signatures .next ();
349349
350350 if (!selfSigned || sig .getKeyID () == this .getKeyID ())
351351 {
@@ -554,7 +554,7 @@ public Iterator<PGPSignature> getSignaturesForKeyID(
554554
555555 for (Iterator <PGPSignature > it = getSignatures (); it .hasNext (); )
556556 {
557- PGPSignature sig = it .next ();
557+ PGPSignature sig = ( PGPSignature ) it .next ();
558558
559559 if (sig .getKeyID () == keyID )
560560 {
@@ -576,7 +576,7 @@ private Iterator<PGPSignature> getSignaturesForID(
576576 if (id .equals (ids .get (i )))
577577 {
578578 userIdFound = true ;
579- signatures .addAll (idSigs .get (i ));
579+ signatures .addAll (( List < PGPSignature >) idSigs .get (i ));
580580 }
581581 }
582582
@@ -600,7 +600,7 @@ public Iterator<PGPSignature> getSignaturesForUserAttribute(
600600 if (userAttributes .equals (ids .get (i )))
601601 {
602602 attributeFound = true ;
603- signatures .addAll (idSigs .get (i ));
603+ signatures .addAll (( List < PGPSignature >) idSigs .get (i ));
604604 }
605605 }
606606
@@ -621,7 +621,7 @@ public Iterator<PGPSignature> getSignaturesOfType(
621621
622622 while (it .hasNext ())
623623 {
624- PGPSignature sig = it .next ();
624+ PGPSignature sig = ( PGPSignature ) it .next ();
625625
626626 if (sig .getSignatureType () == signatureType )
627627 {
@@ -645,7 +645,7 @@ public Iterator<PGPSignature> getSignatures()
645645
646646 for (int i = 0 ; i != idSigs .size (); i ++)
647647 {
648- sigs .addAll (idSigs .get (i ));
648+ sigs .addAll (( List < PGPSignature >) idSigs .get (i ));
649649 }
650650
651651 return sigs .iterator ();
@@ -747,7 +747,7 @@ public void encode(
747747 {
748748 for (int i = 0 ; i != keySigs .size (); i ++)
749749 {
750- keySigs .get (i ).encode (out );
750+ (( PGPSignature ) keySigs .get (i ) ).encode (out );
751751 }
752752
753753 for (int i = 0 ; i != ids .size (); i ++)
@@ -767,21 +767,21 @@ public void encode(
767767
768768 if (!forTransfer && idTrusts .get (i ) != null )
769769 {
770- out .writePacket (idTrusts .get (i ));
770+ out .writePacket (( TrustPacket ) idTrusts .get (i ));
771771 }
772772
773- List <PGPSignature > sigs = idSigs .get (i );
773+ List <PGPSignature > sigs = ( List < PGPSignature >) idSigs .get (i );
774774 for (int j = 0 ; j != sigs .size (); j ++)
775775 {
776- sigs .get (j ).encode (out , forTransfer );
776+ (( PGPSignature ) sigs .get (j ) ).encode (out , forTransfer );
777777 }
778778 }
779779 }
780780 else
781781 {
782782 for (int j = 0 ; j != subSigs .size (); j ++)
783783 {
784- subSigs .get (j ).encode (out , forTransfer );
784+ (( PGPSignature ) subSigs .get (j ) ).encode (out , forTransfer );
785785 }
786786 }
787787 }
@@ -811,7 +811,7 @@ public boolean hasRevocation()
811811 {
812812 while (!revoked && (ns < keySigs .size ()))
813813 {
814- if (keySigs .get (ns ++).getSignatureType () == PGPSignature .KEY_REVOCATION )
814+ if ((( PGPSignature ) keySigs .get (ns ++) ).getSignatureType () == PGPSignature .KEY_REVOCATION )
815815 {
816816 revoked = true ;
817817 }
@@ -821,7 +821,7 @@ public boolean hasRevocation()
821821 {
822822 while (!revoked && (ns < subSigs .size ()))
823823 {
824- if (subSigs .get (ns ++).getSignatureType () == PGPSignature .SUBKEY_REVOCATION )
824+ if ((( PGPSignature ) subSigs .get (ns ++) ).getSignatureType () == PGPSignature .SUBKEY_REVOCATION )
825825 {
826826 revoked = true ;
827827 }
@@ -891,7 +891,7 @@ private static PGPPublicKey addCert(
891891 {
892892 if (id .equals (returnKey .ids .get (i )))
893893 {
894- sigList = returnKey .idSigs .get (i );
894+ sigList = ( List < PGPSignature >) returnKey .idSigs .get (i );
895895 }
896896 }
897897
@@ -1041,7 +1041,7 @@ private static PGPPublicKey removeCert(
10411041 {
10421042 if (id .equals (returnKey .ids .get (i )))
10431043 {
1044- found = returnKey .idSigs .get (i ).remove (certification );
1044+ found = (( List < PGPSignature >) returnKey .idSigs .get (i ) ).remove (certification );
10451045 }
10461046 }
10471047
@@ -1120,7 +1120,7 @@ public static PGPPublicKey removeCertification(
11201120 {
11211121 for (Iterator <byte []> it = key .getRawUserIDs (); it .hasNext (); )
11221122 {
1123- byte [] rawID = it .next ();
1123+ byte [] rawID = ( byte []) it .next ();
11241124 for (Iterator <PGPSignature > sIt = key .getSignaturesForID (rawID ); sIt .hasNext (); )
11251125 {
11261126 if (certification == sIt .next ())
@@ -1135,7 +1135,7 @@ public static PGPPublicKey removeCertification(
11351135 {
11361136 for (Iterator <PGPUserAttributeSubpacketVector > it = key .getUserAttributes (); it .hasNext (); )
11371137 {
1138- PGPUserAttributeSubpacketVector id = it .next ();
1138+ PGPUserAttributeSubpacketVector id = ( PGPUserAttributeSubpacketVector ) it .next ();
11391139 for (Iterator <PGPSignature > sIt = key .getSignaturesForUserAttribute (id ); sIt .hasNext (); )
11401140 {
11411141 if (certification == sIt .next ())
@@ -1196,11 +1196,11 @@ public static PGPPublicKey join(
11961196 // key signatures
11971197 for (Iterator <PGPSignature > it = copy .keySigs .iterator (); it .hasNext ();)
11981198 {
1199- PGPSignature keySig = it .next ();
1199+ PGPSignature keySig = ( PGPSignature ) it .next ();
12001200 boolean found = false ;
12011201 for (int i = 0 ; i < keySigs .size (); i ++)
12021202 {
1203- PGPSignature existingKeySig = keySigs .get (i );
1203+ PGPSignature existingKeySig = ( PGPSignature ) keySigs .get (i );
12041204 if (PGPSignature .isSignatureEncodingEqual (existingKeySig , keySig ))
12051205 {
12061206 found = true ;
@@ -1221,14 +1221,14 @@ public static PGPPublicKey join(
12211221 // user-ids and id sigs
12221222 for (int idIdx = 0 ; idIdx < copy .ids .size (); idIdx ++)
12231223 {
1224- UserDataPacket copyId = copy .ids .get (idIdx );
1225- List <PGPSignature > copyIdSigs = new ArrayList <PGPSignature >(copy .idSigs .get (idIdx ));
1226- TrustPacket copyTrust = copy .idTrusts .get (idIdx );
1224+ UserDataPacket copyId = ( UserDataPacket ) copy .ids .get (idIdx );
1225+ List <PGPSignature > copyIdSigs = new ArrayList <PGPSignature >(( List < PGPSignature >) copy .idSigs .get (idIdx ));
1226+ TrustPacket copyTrust = ( TrustPacket ) copy .idTrusts .get (idIdx );
12271227
12281228 int existingIdIndex = -1 ;
12291229 for (int i = 0 ; i < ids .size (); i ++)
12301230 {
1231- UserDataPacket existingId = ids .get (i );
1231+ UserDataPacket existingId = ( UserDataPacket ) ids .get (i );
12321232 if (existingId .equals (copyId ))
12331233 {
12341234 existingIdIndex = i ;
@@ -1255,22 +1255,22 @@ public static PGPPublicKey join(
12551255 // existing user-id
12561256 if (joinTrustPackets && copyTrust != null )
12571257 {
1258- TrustPacket existingTrust = idTrusts .get (existingIdIndex );
1258+ TrustPacket existingTrust = ( TrustPacket ) idTrusts .get (existingIdIndex );
12591259 if (existingTrust == null || Arrays .areEqual (copyTrust .getLevelAndTrustAmount (), existingTrust .getLevelAndTrustAmount ()))
12601260 {
12611261 idTrusts .remove (existingIdIndex );
12621262 idTrusts .add (existingIdIndex , copyTrust );
12631263 }
12641264 }
12651265
1266- List <PGPSignature > existingIdSigs = idSigs .get (existingIdIndex );
1266+ List <PGPSignature > existingIdSigs = ( List < PGPSignature >) idSigs .get (existingIdIndex );
12671267 for (Iterator <PGPSignature > it = copyIdSigs .iterator (); it .hasNext ();)
12681268 {
1269- PGPSignature newSig = it .next ();
1269+ PGPSignature newSig = ( PGPSignature ) it .next ();
12701270 boolean found = false ;
12711271 for (int i = 0 ; i < existingIdSigs .size (); i ++)
12721272 {
1273- PGPSignature existingSig = existingIdSigs .get (i );
1273+ PGPSignature existingSig = ( PGPSignature ) existingIdSigs .get (i );
12741274 if (PGPSignature .isSignatureEncodingEqual (newSig , existingSig ))
12751275 {
12761276 found = true ;
@@ -1299,11 +1299,11 @@ public static PGPPublicKey join(
12991299 {
13001300 for (Iterator <PGPSignature > it = copy .subSigs .iterator (); it .hasNext ();)
13011301 {
1302- PGPSignature copySubSig = it .next ();
1302+ PGPSignature copySubSig = ( PGPSignature ) it .next ();
13031303 boolean found = false ;
13041304 for (int i = 0 ; subSigs != null && i < subSigs .size (); i ++)
13051305 {
1306- PGPSignature existingSubSig = subSigs .get (i );
1306+ PGPSignature existingSubSig = ( PGPSignature ) subSigs .get (i );
13071307 if (PGPSignature .isSignatureEncodingEqual (existingSubSig , copySubSig ))
13081308 {
13091309 found = true ;
0 commit comments