Skip to content

Remove unused HttpUtil.executeGetRequest - #587

Merged
tonygermano merged 1 commit into
OpenIntegrationEngine:mainfrom
pacmano1:httputil-test-oie-site
Nov 27, 2026
Merged

tonygermano merged 1 commit into
OpenIntegrationEngine:mainfrom
pacmano1:httputil-test-oie-site

Conversation

@pacmano1

@pacmano1 pacmano1 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #313.

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. This removes both executeGetRequest overloads, doExecuteGetRequest and the test. getHttpClient stays, since code outside the engine still calls it.

Release notes: the public com.mirth.connect.util.HttpUtil.executeGetRequest (both overloads) is removed. It shipped in mirth-server.jar and mirth-client-core.jar but was never part of the documented userutil API.

Tested

  • ./gradlew clean build: 937 tests, 0 failures.

Co-authored with Claude Code.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Test Results

  147 files  ±0    147 suites  ±0   4m 51s ⏱️ +59s
  995 tests  - 1    995 ✅  - 1  0 💤 ±0  0 ❌ ±0 
1 313 runs   - 1  1 307 ✅  - 1  6 💤 ±0  0 ❌ ±0 

Results for commit 45e2e89. ± Comparison against base commit da38caf.

This pull request removes 1 test.
com.mirth.connect.util.HttpUtilTest ‑ testExecuteGetRequest

♻️ This comment has been updated with latest results.

@pacmano1
pacmano1 force-pushed the httputil-test-oie-site branch from cd25fb9 to 24564eb Compare November 17, 2026 19:05
@pacmano1 pacmano1 changed the title Point HttpUtilTest's live request at openintegrationengine.org Run HttpUtilTest's GET request against a local HTTPS server Nov 17, 2026
mgaffigan
mgaffigan previously approved these changes Nov 18, 2026
jonbartels
jonbartels previously approved these changes Nov 20, 2026

@tonygermano tonygermano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

  1. 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 with HttpUtil.executeGetRequest, and e2b5878 (Whitelabel engine) removed it. Nothing in the repo has called it since. Concretely:
    • In HttpUtil, delete both executeGetRequest overloads, doExecuteGetRequest, and getHttpClient (only doExecuteGetRequest uses it), plus any imports this leaves unused.
    • In HttpUtilTest, delete testExecuteGetRequest and its imports. The map and query-string tests stay.
      This still fixes #313, because the test that called home goes away with the code.
  2. 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."
  3. These are public methods in com.mirth.connect.util, which ships in mirth-client-core.jar and mirth-server.jar, so an extension or a channel script could in principle call them. They were never part of the documented userutil API, 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

@pacmano1
pacmano1 dismissed stale reviews from jonbartels and mgaffigan via edd2ae3 November 25, 2026 23:49
@pacmano1
pacmano1 force-pushed the httputil-test-oie-site branch from 24564eb to edd2ae3 Compare November 25, 2026 23:49
@pacmano1 pacmano1 changed the title Run HttpUtilTest's GET request against a local HTTPS server Remove unused HttpUtil.executeGetRequest Nov 25, 2026
@pacmano1

Copy link
Copy Markdown
Contributor Author

Dropped executeGetRequest, doExecuteGetRequest and the test, and redid the title, description and commit message, with a line about the removed methods for the release notes.

I'd keep getHttpClient. We build hundreds of mutual-TLS clients with it, one per practice, in code templates for a device vendor's web service. If you want it gone anyway, I'd rather that be its own PR with its own release note than ride along with a test fix.

@tonygermano tonygermano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 HttpUtil and HttpUtilTest are 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>
@mgaffigan
mgaffigan force-pushed the httputil-test-oie-site branch from edd2ae3 to 45e2e89 Compare November 26, 2026 19:11
@tonygermano
tonygermano merged commit 45e2e89 into OpenIntegrationEngine:main Nov 27, 2026
11 of 12 checks passed
@tonygermano tonygermano added this to the 4.8.0 milestone Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix call-home in test run

5 participants