diff --git a/compiler/src/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java b/compiler/src/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java index 3c6090af844..f72850e450a 100644 --- a/compiler/src/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java +++ b/compiler/src/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java @@ -24,6 +24,8 @@ */ package org.graalvm.compiler.hotspot.test; +import java.util.Objects; + import org.graalvm.compiler.core.test.GraalCompilerTest; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.extended.ForeignCallNode; @@ -73,10 +75,21 @@ public class ExplicitExceptionTest extends GraalCompilerTest { @Test public void testAIOOBE() { int[] array = new int[4]; + String msg = null; for (int i = 0; i < 10000; i++) { try { testAIOOBESnippet(array); } catch (ArrayIndexOutOfBoundsException e) { + if (i == 0) { + msg = e.getMessage(); + System.out.println("message on iteration " + i + ": " + msg); + } else { + String msg2 = e.getMessage(); + if (!Objects.equals(msg, msg2)) { + System.out.println("message on iteration " + i + ": " + msg2); + msg = msg2; + } + } // nothing to do } }