leedongkyu0407 opened a new pull request, #1954:
URL: https://github.com/apache/stormcrawler/pull/1954

   Closes #1951
   
   ## Summary
   Replace the O(n) linear scan in `getConfiguredProxy()` with an O(1) map 
lookup by putting proxy identity on the type itself.
   
   ## Changes
   - Added `equals`/`hashCode` to `SCProxy` based on identity fields only: 
`protocol` and `address` (lowercased), `port`, `username`, `password`. Excludes 
`country`, `area`, `location`, `status`, and `usage`.
   - Built a `Map<SCProxy, SCProxy>` in both `configure()` overloads and 
replaced `getConfiguredProxy` with `Optional.ofNullable(map.get(proxy))`
   - Removed `ProxyUtils.isSameProxy` and its private `normalize` helper, 
folding the logic into `SCProxy.equals`
   
   ## Notes
   - No behavior change
   - Single definition of proxy identity, less dead code
   - `MultiProxyManagerTest`: 13/13 passed
   - `ProtocolTest.testBlocking` failure is pre-existing and unrelated to this 
change
   
   ### For all changes
   - [x] Is there a issue associated with this PR? Is it referenced in the 
commit message?
   - [x] Does your PR title start with `#XXXX` where `XXXX` is the issue number 
you are trying to resolve?
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically main)?
   - [x] Is your initial contribution a single, squashed commit?
   - [ ] Is the code properly formatted with `mvn git-code-format:format-code 
-Dgcf.globPattern="**/*" -Dskip.format.code=false`?
   ### For code changes
   - [x] Have you ensured that the full suite of tests is executed via `mvn 
clean verify`?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under ASF 2.0?
   - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file?


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