< prev index next >
src/com/sun/javatest/ExcludeList.java
Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg
*** 381,391 ****
* @param other the exclude list to be merged with this one.
*
*/
public void merge(ExcludeList other) {
synchronized (table) {
! for (Iterator iter = other.getIterator(false); iter.hasNext(); ) {
Entry otherEntry = (Entry) (iter.next());
Key key = new Key(otherEntry.relativeURL);
Object o = table.get(key);
if (o == null) {
// Easy case: nothing already exists in the table, so just
--- 381,391 ----
* @param other the exclude list to be merged with this one.
*
*/
public void merge(ExcludeList other) {
synchronized (table) {
! for (Iterator<?> iter = other.getIterator(false); iter.hasNext(); ) {
Entry otherEntry = (Entry) (iter.next());
Key key = new Key(otherEntry.relativeURL);
Object o = table.get(key);
if (o == null) {
// Easy case: nothing already exists in the table, so just
*** 525,535 ****
* @return an iterator for the table: the entries are either
* single instances of @link(Entry) or a mixture of @link(Entry)
* and @link(Entry)[], depending on the <code>group</code>
* parameter.
*/
! public Iterator<Object> getIterator(boolean group) {
if (group)
return table.values().iterator();
else {
// flatten the enumeration into a vector, then
// enumerate that
--- 525,535 ----
* @return an iterator for the table: the entries are either
* single instances of @link(Entry) or a mixture of @link(Entry)
* and @link(Entry)[], depending on the <code>group</code>
* parameter.
*/
! public Iterator<?> getIterator(boolean group) {
if (group)
return table.values().iterator();
else {
// flatten the enumeration into a vector, then
// enumerate that
*** 574,584 ****
// sort the entries for convenience, and measure col widths
int maxURLWidth = 0;
int maxBugIdWidth = 0;
int maxPlatformWidth = 0;
SortedSet<Entry> entries = new TreeSet<>();
! for (Iterator iter = getIterator(false); iter.hasNext(); ) {
Entry entry = (Entry) (iter.next());
entries.add(entry);
if (entry.testCase == null)
maxURLWidth = Math.max(entry.relativeURL.length(), maxURLWidth);
else
--- 574,584 ----
// sort the entries for convenience, and measure col widths
int maxURLWidth = 0;
int maxBugIdWidth = 0;
int maxPlatformWidth = 0;
SortedSet<Entry> entries = new TreeSet<>();
! for (Iterator<?> iter = getIterator(false); iter.hasNext(); ) {
Entry entry = (Entry) (iter.next());
entries.add(entry);
if (entry.testCase == null)
maxURLWidth = Math.max(entry.relativeURL.length(), maxURLWidth);
else
*** 934,944 ****
}
/**
* An entry in the exclude list.
*/
! public static final class Entry implements Comparable {
/**
* Create an ExcludeList entry.
* @param u The URL for the test, specified relative to the test suite root.
* @param tc One or more test cases within the test to be excluded.
* @param b An array of bug identifiers, justifying why the test is excluded.
--- 934,944 ----
}
/**
* An entry in the exclude list.
*/
! public static final class Entry implements Comparable<Entry> {
/**
* Create an ExcludeList entry.
* @param u The URL for the test, specified relative to the test suite root.
* @param tc One or more test cases within the test to be excluded.
* @param b An array of bug identifiers, justifying why the test is excluded.
*** 992,1003 ****
platforms = p;
synopsis = s;
}
! public int compareTo(Object o) {
! Entry e = (Entry) o;
int n = relativeURL.compareTo(e.relativeURL);
if (n == 0) {
if (testCase == null && e.testCase == null)
return 0;
else if (testCase == null)
--- 992,1002 ----
platforms = p;
synopsis = s;
}
! public int compareTo(Entry e) {
int n = relativeURL.compareTo(e.relativeURL);
if (n == 0) {
if (testCase == null && e.testCase == null)
return 0;
else if (testCase == null)
< prev index next >