< prev index next >

src/com/sun/javatest/EditJTI.java

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

@@ -452,13 +452,13 @@
         p.load(in);
         in.close();
 
         String interviewClassName = (String) (p.get("INTERVIEW"));
         try {
-            Class interviewClass = loader.loadClass(interviewClassName);
+            Class<InterviewParameters> interviewClass = (Class<InterviewParameters>) loader.loadClass(interviewClassName);
 
-            interview = (InterviewParameters)(interviewClass.newInstance());
+            interview = interviewClass.newInstance();
         }
         catch (ClassCastException e) {
             throw new Fault(i18n, "editJTI.invalidInterview", inFile);
         }
         catch (ClassNotFoundException e) {
< prev index next >