Loyal-Young opened a new pull request, #11269:
URL: https://github.com/apache/rocketmq/pull/11269

   ### Which Issue(s) This PR Fixes
   
   - Fixes #11268.
   
   ### Brief Description
   
   ServiceProvider.load stops at the first blank line and tries to load 
comments or whitespace as class names. loadClass likewise cannot find a valid 
provider after leading blank/comment lines.
   
   Parse every line, strip inline comments and surrounding whitespace, skip 
empty entries, and deduplicate normalized provider names. Keep the existing 
descriptor path and ordering.
   
   Reproduction: Use a descriptor with leading comments, blank lines, inline 
comments, whitespace, and a repeated provider; load must return both unique 
providers and loadClass must select the first valid one.
   
   This is an independent bug fix based on develop 
`78b96bc5e21216cd7896efae08f90c5cde4cae53`, not stacked on the other 
contributions. It changes one implementation and adds one regression test file; 
no new protocol or public API is introduced.
   
   ### How Did You Test This Change?
   
   - The bug-specific regression fails against the unmodified implementation.
   - On this independent branch, JDK 8 / Maven 3.9.9: 
`ServiceProviderDescriptorTest` — 2 tests passed, zero failures/errors/skips.
   - Command: `mvn -pl common -am -Dspotbugs.skip=true -Djacoco.skip=true 
-Dsurefire.failIfNoSpecifiedTests=false -Dtest=ServiceProviderDescriptorTest 
test`.
   - The combined candidate changes also pass the complete common-module suite: 
284 tests, zero failures/errors/skips.
   - Maven Checkstyle passed; `git diff --check` passed. Local runs disable 
JaCoCo and SpotBugs; this does not claim that upstream GitHub Actions have run 
or passed.
   


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