eppleton commented on PR #9433: URL: https://github.com/apache/netbeans/pull/9433#issuecomment-5853460076
I built the PR and tested SourcePath.showSource with a Kotlin class compiled with an inline function, so it has an SMAP: strata [Java, Kotlin, KotlinDebug], default Kotlin. At the breakpoint the Java line is 9 and the Kotlin line is 2. The PR removes stratumn = csf.getDefaultStratum() before the default-stratum lookup. When the requested stratum has no source but the default one does, like with JSP servlet situation, the editor now opens the default stratum's file at the requested stratum's line. In my test, requesting Java when only the Kotlin-stratum file exists opens it at line 9 on the PR, while master opens line 2. So the change also affects cases that worked before, not only those where no URL was found. For Kotlin itself, the lookup fails because the SMAP's source path is HiKt (a class name). The PR finds the file through the Java stratum and keeps the Kotlin line, which works only because both strata point to the same file. Also: BreakpointInKotlinTest uses a class without an SMAP, so only the Java stratum exists and the test passes on master too. And getURL(CallStackFrame, …), which the current-line annotation uses, still returns null for the Kotlin stratum. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
