mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-24 22:55:45 +00:00
Fix intermittent ClassCastExceptions on job console
* Histotable.java, ToePool.java
only tally Strings; convert all histotable keys to strings for sorting
This commit is contained in:
@@ -83,8 +83,8 @@ public class Histotable<K> extends TreeMap<K,Long> {
|
||||
if (firstVal < secondVal) { return 1; }
|
||||
if (secondVal < firstVal) { return -1; }
|
||||
// If the values are the same, sort by keys.
|
||||
String firstKey = (String) ((Map.Entry<K,Long>) e1).getKey();
|
||||
String secondKey = (String) ((Map.Entry<K,Long>) e2).getKey();
|
||||
String firstKey = ((Map.Entry<K,Long>) e1).getKey().toString();
|
||||
String secondKey = ((Map.Entry<K,Long>) e2).getKey().toString();
|
||||
return firstKey.compareTo(secondKey);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -270,7 +270,7 @@ public class ToePool extends ThreadGroup implements MultiReporter {
|
||||
}
|
||||
ToeThread tt = (ToeThread)toes[i];
|
||||
if(tt!=null) {
|
||||
steps.tally(tt.getStep());
|
||||
steps.tally(tt.getStep().toString());
|
||||
processors.tally(tt.getCurrentProcessorName());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user