Fix the test to run with java 8

This commit is contained in:
Roland Praml
2021-08-09 09:46:49 +02:00
parent 7ed2de9178
commit e18c190905
@@ -14,7 +14,11 @@ public class BasicProfileLocationTest {
assertThat(loc.obtain()).isTrue();
assertThat(loc.fullLocation()).endsWith(":12)");
assertThat(loc.location()).isEqualTo("java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0");
if (System.getProperty("java.version").startsWith("1.8")) {
assertThat(loc.location()).isEqualTo("sun.reflect.NativeMethodAccessorImpl.invoke0");
} else {
assertThat(loc.location()).isEqualTo("java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0");
}
assertThat(loc.label()).isEqualTo("NativeMethodAccessorImpl.invoke0");
}