wu-sheng opened a new pull request, #13746:
URL: https://github.com/apache/skywalking/pull/13746

   ### Fix MAL codegen failure when sum() has >10 label keys
   - [x] Add a unit test to verify that the fix works.
   - [x] Explain briefly why the bug exists and how to fix it.
   
   **Bug**: Javassist cannot resolve `List.of()` varargs overload for >10 
elements (JDK 11 only has fixed-arity overloads for 0–10). MAL expressions with 
`sum()` over 12 label keys (e.g., serviceRelation histogram percentile rules) 
fail to compile.
   
   **Fix**: Changed `StringListArgument` and `NumberListArgument` codegen from 
`List.of(...)` to `Arrays.asList(new T[]{...})`, which works for any number of 
elements.
   
   **Test refactoring**: Split `MALClassGeneratorTest` (41 tests) into 3 
classes by scope:
   - `MALClassGeneratorTest` (18) — basic compilation, error handling, bytecode 
verification
   - `MALClassGeneratorClosureTest` (14) — tag/forEach closures, regex, 
network-profiling patterns
   - `MALClassGeneratorScopeTest` (9) — full-expression scope tests (endpoint, 
service, instance, serviceRelation)
   
   All 68 tests pass.
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace 
the issue number. Closes #<issue number>.
   - [ ] Update the [`CHANGES` 
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).


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