jdk/src/share/classes/javax/crypto/KeyGenerator.java
changeset 10336 0bb1999251f8
parent 9035 1255eb81cc2f
child 18771 9dadb0719cea
--- a/jdk/src/share/classes/javax/crypto/KeyGenerator.java	Mon Aug 15 12:56:01 2011 -0700
+++ b/jdk/src/share/classes/javax/crypto/KeyGenerator.java	Mon Aug 15 11:48:20 2011 -0700
@@ -127,7 +127,7 @@
 
     private final Object lock = new Object();
 
-    private Iterator serviceIterator;
+    private Iterator<Service> serviceIterator;
 
     private int initType;
     private int initKeySize;
@@ -150,7 +150,8 @@
 
     private KeyGenerator(String algorithm) throws NoSuchAlgorithmException {
         this.algorithm = algorithm;
-        List list = GetInstance.getServices("KeyGenerator", algorithm);
+        List<Service> list =
+                GetInstance.getServices("KeyGenerator", algorithm);
         serviceIterator = list.iterator();
         initType = I_NONE;
         // fetch and instantiate initial spi
@@ -320,7 +321,7 @@
                 return null;
             }
             while (serviceIterator.hasNext()) {
-                Service s = (Service)serviceIterator.next();
+                Service s = serviceIterator.next();
                 if (JceSecurity.canUseProvider(s.getProvider()) == false) {
                     continue;
                 }