< prev index next >

src/com/sun/interview/JavaHelpFactory.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

@@ -46,11 +46,11 @@
     private static final ResourceBundle i18n = ResourceBundle.getBundle("com.sun.interview.i18n");
 
     public JavaHelpFactory() {
     }
 
-    public Object createHelpSetObject(String name, Class c) throws Interview.Fault {
+    public Object createHelpSetObject(String name, Class<?> c) throws Interview.Fault {
         ClassLoader cl = c.getClassLoader();
         String hsn;
         String pref = "";
         if (name.startsWith("/")) {
             hsn = name.substring(1); // strip off leading /

@@ -85,11 +85,11 @@
     }
 
     public Object createHelpID(Object hsObject, String target) {
         if (hsObject != null) {
             HelpSet hs = (HelpSet) hsObject;
-            HashMap m = hs.getCombinedMap();
+            HashMap<String, URL> m = hs.getCombinedMap();
             if (m != null && !m.isEmpty()) {
                 return HelpID.create(target, hs);
             }
         }
 

@@ -101,12 +101,12 @@
         HelpSet oldHelpSet = (HelpSet)interview.getHelpSet();
         if (interview.getParent() == null) {
             if (oldHelpSet == null) {
                 // no previously registered helpset
                 // so add in any helpsets for child interviews
-                for (Iterator iter = interview.getInterviews().iterator(); iter.hasNext(); ) {
-                    Interview i = (Interview) (iter.next());
+                for (Iterator<Interview> iter = interview.getInterviews().iterator(); iter.hasNext(); ) {
+                    Interview i = iter.next();
                     HelpSet ihs = (HelpSet)i.getHelpSet();
                     if (ihs != null)
                         newHelpSet.add(ihs);
                     }
                 }
< prev index next >