< prev index next >
src/com/sun/javatest/TestFinderQueue.java
Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg
@@ -184,11 +184,11 @@
rootDir = (testSuiteRoot.isDirectory() ?
testSuiteRoot : new File(testSuiteRoot.getParent()));
// build up the fifo of tests to be used by readNextFile
- tests = new Fifo();
+ tests = new Fifo<>();
currInitialFile = null;
for (int pass = 0; pass < 2; pass++) {
for (int i = 0; i < files.length; i++) {
File f = files[i];
@@ -231,11 +231,11 @@
* @param tds the test descriptions to be "found again".
* @deprecated retained for historical purposes
*/
public void repeat(TestDescription[] tds) {
if (tests == null)
- tests = new Fifo(); // for now
+ tests = new Fifo<>(); // for now
for (int i = 0; i < tds.length; i++) {
TestDescription td = tds[i];
testDescsFound.insert(td);
testsFoundCount++;
notifier.found(td);
@@ -256,11 +256,11 @@
synchronized (this) {
while (needReadAhead() && readNextFile()) /*NO-OP*/;
// read files until there is a test description available or there
// are no more files.
- while ((td = (TestDescription)(testDescsFound.remove())) == null) {
+ while ((td = testDescsFound.remove()) == null) {
boolean ok = readNextFile();
if (!ok)
return null;
}
@@ -505,11 +505,11 @@
}
// are there any more tests that have not been read?
// check until we find one (just one).
while (filesToRead.isEmpty() && !tests.isEmpty()) {
- currInitialFile = (File)tests.remove();
+ currInitialFile = tests.remove();
foundFile(currInitialFile);
}
// if we didn't find any more initial files, there is nothing more to do
if (filesToRead.isEmpty()) {
@@ -685,21 +685,21 @@
//----------member variables------------------------------------------------
private TestFinder testFinder;
- private Fifo tests;
+ private Fifo<File> tests;
private TestFilter[] filters;
private String selectedId;
private File rootDir;
private File currInitialFile;
private int testsFoundCountBeforeCurrInitialFile;
private boolean zeroTestsOK;
private Vector<File> filesToRead = new Vector<>(32, 8);
private int fileInsertPosn;
- private Fifo testDescsFound = new Fifo();
+ private Fifo<TestDescription> testDescsFound = new Fifo<>();
private int filesRemainingCount;
private int filesDoneCount;
private int testsDoneCount;
private int testsFoundCount;
private int errorCount;
< prev index next >