< 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,194 **** rootDir = (testSuiteRoot.isDirectory() ? testSuiteRoot : new File(testSuiteRoot.getParent())); // build up the fifo of tests to be used by readNextFile ! tests = new Fifo(); currInitialFile = null; for (int pass = 0; pass < 2; pass++) { for (int i = 0; i < files.length; i++) { File f = files[i]; --- 184,194 ---- rootDir = (testSuiteRoot.isDirectory() ? testSuiteRoot : new File(testSuiteRoot.getParent())); // build up the fifo of tests to be used by readNextFile ! 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,241 **** * @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 for (int i = 0; i < tds.length; i++) { TestDescription td = tds[i]; testDescsFound.insert(td); testsFoundCount++; notifier.found(td); --- 231,241 ---- * @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 for (int i = 0; i < tds.length; i++) { TestDescription td = tds[i]; testDescsFound.insert(td); testsFoundCount++; notifier.found(td);
*** 256,266 **** 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) { boolean ok = readNextFile(); if (!ok) return null; } --- 256,266 ---- synchronized (this) { while (needReadAhead() && readNextFile()) /*NO-OP*/; // read files until there is a test description available or there // are no more files. ! while ((td = testDescsFound.remove()) == null) { boolean ok = readNextFile(); if (!ok) return null; }
*** 505,515 **** } // 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(); foundFile(currInitialFile); } // if we didn't find any more initial files, there is nothing more to do if (filesToRead.isEmpty()) { --- 505,515 ---- } // are there any more tests that have not been read? // check until we find one (just one). while (filesToRead.isEmpty() && !tests.isEmpty()) { ! currInitialFile = tests.remove(); foundFile(currInitialFile); } // if we didn't find any more initial files, there is nothing more to do if (filesToRead.isEmpty()) {
*** 685,705 **** //----------member variables------------------------------------------------ private TestFinder testFinder; ! private Fifo 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 int filesRemainingCount; private int filesDoneCount; private int testsDoneCount; private int testsFoundCount; private int errorCount; --- 685,705 ---- //----------member variables------------------------------------------------ private TestFinder testFinder; ! 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<TestDescription> testDescsFound = new Fifo<>(); private int filesRemainingCount; private int filesDoneCount; private int testsDoneCount; private int testsFoundCount; private int errorCount;
< prev index next >