< prev index next >

src/com/sun/javatest/junit/JUnitTestFinder.java

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

*** 119,129 **** * @param extn The extension for which this class is to be used * @param commentStreamClass * A class to read files of a particular extension. * The class must be a subtype of CommentStream */ ! public void addExtension(String extn, Class commentStreamClass) { if (!extn.startsWith(".")) throw new IllegalArgumentException("extension must begin with `.'"); if (commentStreamClass != null && !CommentStream.class.isAssignableFrom(commentStreamClass)) throw new IllegalArgumentException("class must be a subtype of " + CommentStream.class.getName()); --- 119,129 ---- * @param extn The extension for which this class is to be used * @param commentStreamClass * A class to read files of a particular extension. * The class must be a subtype of CommentStream */ ! public void addExtension(String extn, Class<?> commentStreamClass) { if (!extn.startsWith(".")) throw new IllegalArgumentException("extension must begin with `.'"); if (commentStreamClass != null && !CommentStream.class.isAssignableFrom(commentStreamClass)) throw new IllegalArgumentException("class must be a subtype of " + CommentStream.class.getName());
*** 133,143 **** /** * Get the class used to handle an extension. * @param extn The extension in question * @return the class previously registered with addExtension */ ! public Class getClassForExtension(String extn) { return extensionTable.get(extn); } /** * Call to register the methods which are test methods. --- 133,143 ---- /** * Get the class used to handle an extension. * @param extn The extension in question * @return the class previously registered with addExtension */ ! public Class<?> getClassForExtension(String extn) { return extensionTable.get(extn); } /** * Call to register the methods which are test methods.
*** 149,159 **** protected boolean verbose = false; protected Map<String, String> tdValues = new HashMap<>(); protected boolean scanClasses = false; protected File currFile; protected Map<String, String> excludeList = new HashMap<>(); ! protected Map<String, Class> extensionTable = new HashMap<>(); protected List<String> testMethods; protected static final String[] excludeNames = { "SCCS", "deleted_files", ".svn" }; } --- 149,159 ---- protected boolean verbose = false; protected Map<String, String> tdValues = new HashMap<>(); protected boolean scanClasses = false; protected File currFile; protected Map<String, String> excludeList = new HashMap<>(); ! protected Map<String, Class<?>> extensionTable = new HashMap<>(); protected List<String> testMethods; protected static final String[] excludeNames = { "SCCS", "deleted_files", ".svn" }; }
< prev index next >