7676import java .util .Map ;
7777import java .util .Optional ;
7878import java .util .stream .Collectors ;
79+ import org .jetbrains .kotlin .com .intellij .util .lang .JavaVersion ;
7980import org .joor .Reflect ;
8081import org .joor .ReflectException ;
8182import org .junit .jupiter .api .Assertions ;
8283import org .junit .jupiter .api .Disabled ;
8384import org .junit .jupiter .api .Test ;
8485import org .junit .jupiter .api .condition .DisabledIf ;
8586import org .junit .jupiter .api .condition .EnabledForJreRange ;
86- import org .junit .jupiter .api .condition .EnabledOnJre ;
8787import org .junit .jupiter .api .condition .JRE ;
8888import org .junit .jupiter .params .ParameterizedTest ;
8989import org .junit .jupiter .params .provider .ValueSource ;
@@ -639,11 +639,12 @@ public void sourceFileProbeGroovy() throws IOException, URISyntaxException {
639639 }
640640
641641 @ Test
642- @ EnabledForJreRange (max = JRE .JAVA_24 )
643642 @ DisabledIf (
644643 value = "datadog.environment.JavaVirtualMachine#isJ9" ,
645644 disabledReason = "Issue with J9 when compiling Kotlin code" )
646645 public void sourceFileProbeKotlin () throws IOException , URISyntaxException {
646+ System .out .println (JavaVersion .class .getProtectionDomain ().getCodeSource ().getLocation ());
647+ System .out .println ("Java version:" + JavaVersion .current ().feature );
647648 final String CLASS_NAME = "CapturedSnapshot301" ;
648649 int line = getLineForLineProbe (CLASS_NAME , KOTLIN_EXT , LINE_PROBE_ID1 );
649650 TestSnapshotListener listener =
@@ -670,7 +671,6 @@ public void sourceFileProbeKotlin() throws IOException, URISyntaxException {
670671 }
671672
672673 @ Test
673- @ EnabledForJreRange (max = JRE .JAVA_24 )
674674 @ DisabledIf (
675675 value = "datadog.environment.JavaVirtualMachine#isJ9" ,
676676 disabledReason = "Issue with J9 when compiling Kotlin code" )
@@ -698,7 +698,6 @@ public void suspendKotlin() throws IOException, URISyntaxException {
698698 }
699699
700700 @ Test
701- @ EnabledForJreRange (max = JRE .JAVA_24 )
702701 @ DisabledIf (
703702 value = "datadog.environment.JavaVirtualMachine#isJ9" ,
704703 disabledReason = "Issue with J9 when compiling Kotlin code" )
@@ -732,7 +731,6 @@ public void suspendMethodKotlin() {
732731 }
733732
734733 @ Test
735- @ EnabledForJreRange (max = JRE .JAVA_24 )
736734 @ DisabledIf (
737735 value = "datadog.environment.JavaVirtualMachine#isJ9" ,
738736 disabledReason = "Issue with J9 when compiling Kotlin code" )
@@ -2583,7 +2581,7 @@ private void doSamplingTest(TestMethod testRun, int expectedGlobalCount, int exp
25832581 }
25842582
25852583 @ Test
2586- @ EnabledOnJre ({ JRE . JAVA_17 , JRE .JAVA_21 } )
2584+ @ EnabledForJreRange ( min = JRE .JAVA_17 )
25872585 public void record () throws IOException , URISyntaxException {
25882586 final String CLASS_NAME = "com.datadog.debugger.CapturedSnapshot29" ;
25892587 final String RECORD_NAME = "com.datadog.debugger.MyRecord1" ;
@@ -2603,7 +2601,7 @@ public void record() throws IOException, URISyntaxException {
26032601 }
26042602
26052603 @ Test
2606- @ EnabledOnJre ({ JRE . JAVA_17 , JRE .JAVA_21 } )
2604+ @ EnabledForJreRange ( min = JRE .JAVA_17 )
26072605 public void lineRecord () throws IOException , URISyntaxException {
26082606 final String CLASS_NAME = "com.datadog.debugger.CapturedSnapshot29" ;
26092607 final String RECORD_NAME = "com.datadog.debugger.MyRecord2" ;
0 commit comments