< prev index next > test/hotspot/jtreg/gc/TestFullGCCount.java
8217332: JTREG: Clean up, use generics instead of raw types
public static void main(String[] args) {
int iterations = 20;
boolean failed = false;
String errorMessage = "";
- HashMap<String, List> counts = new HashMap<>();
+ HashMap<String, List<Long>> counts = new HashMap<>();
// Prime the collection of count lists for all collectors.
for (int i = 0; i < collectors.size(); i++) {
GarbageCollectorMXBean collector = collectors.get(i);
counts.put(collector.getName(), new ArrayList<>(iterations));
throw new RuntimeException("FAILED: System.gc collections miscounted.");
}
System.out.println("Passed.");
}
- private static void addCollectionCount(HashMap<String, List> counts, int iteration) {
+ private static void addCollectionCount(HashMap<String, List<Long>> counts, int iteration) {
for (int i = 0; i < collectors.size(); i++) {
GarbageCollectorMXBean collector = collectors.get(i);
- List thisList = counts.get(collector.getName());
+ List<Long> thisList = counts.get(collector.getName());
thisList.add(collector.getCollectionCount());
}
}
}
< prev index next >