Repository navigation
Remove unused HttpUtil.executeGetRequest - #587
Conversation
Test Results 147 files ±0 147 suites ±0 4m 51s ⏱️ +59s Results for commit 45e2e89. ± Comparison against base commit da38caf. This pull request removes 1 test.♻️ This comment has been updated with latest results. |
cd25fb9 to
24564eb
Compare
tonygermano
left a comment
There was a problem hiding this comment.
Not approved yet. Thanks for getting rid of the call home. While looking at it, though, I found that the method under test no longer has any callers, so I'd rather remove it than put a more complicated test around it.
- Please remove the unused GET code and its test, not rewrite the test. The last caller was
Frame.doHelp()in the Administrator, which fetched the help URL withHttpUtil.executeGetRequest, and e2b5878 (Whitelabel engine) removed it. Nothing in the repo has called it since. Concretely:- In
HttpUtil, delete bothexecuteGetRequestoverloads,doExecuteGetRequest, andgetHttpClient(onlydoExecuteGetRequestuses it), plus any imports this leaves unused. - In
HttpUtilTest, deletetestExecuteGetRequestand its imports. The map and query-string tests stay.
This still fixes #313, because the test that called home goes away with the code.
- In
- Please update the PR title, description and commit message to match. Suggested subject:
Remove unused HttpUtil.executeGetRequest. Suggested body text: "HttpUtil.executeGetRequest has had no callers since the Administrator's Help menu stopped fetching its URL in e2b5878. Its test fetched https://www.nextgen.com, which sent the build machine's address and headers to an outside site on every run and failed offline. Remove the method, its helpers and the test." - These are public methods in
com.mirth.connect.util, which ships inmirth-client-core.jarandmirth-server.jar, so an extension or a channel script could in principle call them. They were never part of the documenteduserutilAPI, but please add a line to the PR description saying they were removed, so it can go in the release notes.
🤖 Drafted with Claude Code
24564eb to
edd2ae3
Compare
|
Dropped I'd keep |
tonygermano
left a comment
There was a problem hiding this comment.
Approving. Thanks, this addresses everything I asked for: the unused GET code and its test are gone, the title, description and commit message match the change, and the description has the release-note line.
Keeping getHttpClient is fine with me. Nothing in the engine calls it now, but leaving a public method in place when code outside the engine may use it is the safer choice.
Claude checked (no action needed from the author):
- The imports left in
HttpUtilandHttpUtilTestare all still used. - CI is green on the new commit, including the integration tests on every database.
🤖 Drafted with Claude Code
HttpUtil.executeGetRequest has had no callers since the Administrator's Help menu stopped fetching its URL in e2b5878. Its test fetched https://www.nextgen.com, which sent the build machine's address and headers to an outside site on every run and failed offline. Remove both overloads, doExecuteGetRequest and the test. getHttpClient stays, since code outside the engine still calls it. Fixes OpenIntegrationEngine#313 Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Finnegan's Owner <44065187+pacmano1@users.noreply.github.com>
edd2ae3 to
45e2e89
Compare
45e2e89
into
OpenIntegrationEngine:main
Fixes #313.
HttpUtil.executeGetRequesthas had no callers since the Administrator's Help menu stopped fetching its URL in e2b5878. Its test fetched https://www.nextgen.com, which sent the build machine's address and headers to an outside site on every run and failed offline. This removes bothexecuteGetRequestoverloads,doExecuteGetRequestand the test.getHttpClientstays, since code outside the engine still calls it.Release notes: the public
com.mirth.connect.util.HttpUtil.executeGetRequest(both overloads) is removed. It shipped inmirth-server.jarandmirth-client-core.jarbut was never part of the documenteduserutilAPI.Tested
./gradlew clean build: 937 tests, 0 failures.Co-authored with Claude Code.