Skip to content

Replace Grizzly HTTP Server with Java HTTP Server #1010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

exceptionfactory
Copy link
Contributor

This pull request replaces the Grizzly HTTP Server dependency with the standard Java HttpServer for port forwarding unit tests.

The Java HttpServer is part of the standard JDK since Java 1.6 and requires no external dependencies.



private File docRoot ;
private com.sun.net.httpserver.HttpServer httpServer;
Copy link
Owner

Choose a reason for hiding this comment

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

Jikes... com.sun.net... As far as I remember, wasn't it an antipattern to depend on anything in com.sun as this is not guaranteed to be present in other JVMs.

Copy link
Owner

Choose a reason for hiding this comment

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

Scratch that, I've read up on it... Seems that I'm confusing sun.* and com.sun.*... Nothing to see here, thanks for the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reviewing and merging @hierynomus! Yes, the package name for the JDK HttpServer causes a natural double take, so thanks for giving it a closer look, as it is part of the public JDK.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.54%. Comparing base (27bf52e) to head (3a91195).
Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1010      +/-   ##
============================================
+ Coverage     69.75%   70.54%   +0.78%     
- Complexity     1501     1544      +43     
============================================
  Files           214      215       +1     
  Lines          7681     7914     +233     
  Branches        663      682      +19     
============================================
+ Hits           5358     5583     +225     
+ Misses         1979     1977       -2     
- Partials        344      354      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hierynomus hierynomus merged commit 857d56a into hierynomus:master Apr 22, 2025
6 checks passed
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.

3 participants