--- old/com/oracle/jfr/gc/TestReferenceStatisticsEvent.java 2013-05-02 15:03:59.000000000 +0200 +++ new/com/oracle/jfr/gc/TestReferenceStatisticsEvent.java 2013-05-02 15:03:59.000000000 +0200 @@ -111,11 +111,11 @@ return result; } - private static Long getGCIdFromEvent(FLREvent e) throws Exception { - return (Long) e.getValue("gcId"); + private static Integer getGCIdFromEvent(FLREvent e) throws Exception { + return (Integer) e.getValue("gcId"); } - private static List filterRefProcEventsByGcId(List events, Long id) + private static List filterRefProcEventsByGcId(List events, Integer id) throws Exception { List result = new ArrayList(); for (FLREvent e : events) { @@ -126,8 +126,8 @@ return result; } - private static List mapGCEventsToIds(List events) throws Exception { - List gcIds = new ArrayList(); + private static List mapGCEventsToIds(List events) throws Exception { + List gcIds = new ArrayList(); for (FLREvent e : events) { gcIds.add(getGCIdFromEvent(e)); } @@ -136,11 +136,11 @@ private static List> groupRefStatEventsByGCId(List allEvents, List gcEvents) throws Exception { - List gcIds = mapGCEventsToIds(gcEvents); + List gcIds = mapGCEventsToIds(gcEvents); List refProcEvents = filterEventsOnPath(allEvents, refStatsEventPath); List> result = new ArrayList>(); - for (Long l : gcIds) { - List events = filterRefProcEventsByGcId(refProcEvents, l); + for (Integer id : gcIds) { + List events = filterRefProcEventsByGcId(refProcEvents, id); if (events.size() > 0) { result.add(events); } @@ -153,7 +153,7 @@ return (String) s.getValue("type"); } - private static void assertReferenceType(HashSet types, String type, Long gcId) + private static void assertReferenceType(HashSet types, String type, Integer gcId) throws Exception { assertTrue(types.contains(type + " reference"), "Expected " + refStatsEventPath + " event with type " + type + @@ -163,7 +163,7 @@ private static void verifyRefStatEvents(List events) throws Exception { HashSet types = new HashSet(); - long gcId = -1; + int gcId = -1; for (FLREvent e : events) { types.add(referenceType(e)); gcId = getGCIdFromEvent(e); // all the event should have the same gcId @@ -187,9 +187,9 @@ List gcEvents = filterEventsOnPath(events, gcEventPath); - List gcIds = mapGCEventsToIds(gcEvents); - Long largestGCId = 0L; - for (Long gcId : gcIds) { + List gcIds = mapGCEventsToIds(gcEvents); + Integer largestGCId = 0; + for (Integer gcId : gcIds) { if (gcId > largestGCId) { largestGCId = gcId; }