He-Pin opened a new pull request, #3141:
URL: https://github.com/apache/pekko/pull/3141

   ### Motivation
   
   `TestKitUtils.testNameFromCallStack` uses 
`Thread.currentThread.getStackTrace` which eagerly constructs the full 
`StackTraceElement[]` array including method names, file names, and line 
numbers — but only class names are needed.
   
   ### Modification
   
   Replace with `StackWalker` (JDK 9) which avoids creating full 
`StackTraceElement` objects, only extracting class names via the lighter 
`StackFrame.getClassName()`. The existing filtering logic (`dropWhile` + 
`startsWith` matching) is preserved unchanged.
   
   This follows the pattern already established by `LoggerClass.scala` in the 
same codebase.
   
   ### Result
   
   More efficient stack inspection for test infrastructure.
   
   ### Tests
   
   - `sbt "actor-tests / Test / testOnly 
org.apache.pekko.actor.ActorSystemSpec"` — 20/20 passed
   
   ### References
   
   Refs #3136


-- 
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]

Reply via email to