From 38701678b24bfde6c97fb0d5390e4269a6fa70db Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 20 Oct 2015 18:31:58 +0200 Subject: [PATCH] Specialized some Iterators with correct inferred type --- .../contributions/GPGDetachedSignatureVerifier.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arduino-core/src/cc/arduino/contributions/GPGDetachedSignatureVerifier.java b/arduino-core/src/cc/arduino/contributions/GPGDetachedSignatureVerifier.java index a09bd12fd..216c6dbcb 100644 --- a/arduino-core/src/cc/arduino/contributions/GPGDetachedSignatureVerifier.java +++ b/arduino-core/src/cc/arduino/contributions/GPGDetachedSignatureVerifier.java @@ -97,13 +97,13 @@ public class GPGDetachedSignatureVerifier extends SignatureVerifier { private PGPPublicKey readPublicKey(InputStream input, String keyId) throws IOException, PGPException { PGPPublicKeyRingCollection pgpPub = new PGPPublicKeyRingCollection(PGPUtil.getDecoderStream(input), new BcKeyFingerprintCalculator()); - Iterator keyRingIter = pgpPub.getKeyRings(); + Iterator keyRingIter = pgpPub.getKeyRings(); while (keyRingIter.hasNext()) { - PGPPublicKeyRing keyRing = (PGPPublicKeyRing) keyRingIter.next(); + PGPPublicKeyRing keyRing = keyRingIter.next(); - Iterator keyIter = keyRing.getPublicKeys(); + Iterator keyIter = keyRing.getPublicKeys(); while (keyIter.hasNext()) { - PGPPublicKey key = (PGPPublicKey) keyIter.next(); + PGPPublicKey key = keyIter.next(); if (Long.toHexString(key.getKeyID()).toUpperCase().endsWith(keyId)) { return key;