diff --git a/test/jdk/jdk/jfr/tool/TestPrintXML.java b/test/jdk/jdk/jfr/tool/TestPrintXML.java index dd53955e40174..1df9b77f551d1 100644 --- a/test/jdk/jdk/jfr/tool/TestPrintXML.java +++ b/test/jdk/jdk/jfr/tool/TestPrintXML.java @@ -138,9 +138,13 @@ static boolean compare(Object eventObject, Object xmlObject) { Object xmlValue = xmlMap.get(name); Object expectedValue = re.getValue(name); if (v.getAnnotation(Timestamp.class) != null) { - // Make instant of OffsetDateTime - xmlValue = OffsetDateTime.parse("" + xmlValue).toInstant().toString(); - expectedValue = re.getInstant(name); + if (expectedValue.equals(Long.MIN_VALUE)) { // Missing + expectedValue = OffsetDateTime.MIN; + } else { + // Make instant of OffsetDateTime + xmlValue = OffsetDateTime.parse("" + xmlValue).toInstant().toString(); + expectedValue = re.getInstant(name); + } } if (v.getAnnotation(Timespan.class) != null) { expectedValue = re.getDuration(name);