Hyeon-moGu opened a new pull request, #13713:
URL: https://github.com/apache/skywalking/pull/13713

   - [ ] If this pull request closes/resolves/fixes an existing issue, replace 
the issue number. 
   Part of #13709 .
   - [x] Update the [`CHANGES` 
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
   
   #### Description
   This PR is the first part of the migration from PowerMock's `Whitebox` to 
the standard Java Reflection API to ensure compatibility with JDK 25+ and 
support for virtual threads.
   
   In this phase, the following modules have been refactored and verified:
   - `server-library` 
   - `server-core`
   - `server-configuration`
   
   I have divided the migration into phases to ensure stability and to 
facilitate a more focused code review. All 250+ tests in these modules have 
passed successfully. The remaining modules (Analyzer, Receiver, etc..) will be 
submitted in a subsequent PR.
   
   ---
   
   #### ⚠️ Note for Reviewers: Modification in MetricsStreamProcessor.java
   In `MetricsStreamProcessor.java`, I have removed the `final` keyword from 
the `PROCESSOR` field. 
   
   **Reason:**
   Since modern JDKs strictly prohibit modifying `static final` fields via 
reflection, this change was necessary to maintain the existing test logic in 
`MeterSystemTest`, which requires mocking the singleton instance by injecting a 
`Mockito.spy`.
   
   I would appreciate your guidance on this:
   1. Is removing `final` for testability acceptable in this project?
   2. Or would you prefer an alternative approach, such as refactoring the 
`MeterSystem` design to avoid static mocking in the future?


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

Reply via email to