Skip to content

refactor AbstractHttpClient to use Apache Http Client and fix issues with Java 17

Rustam Lotsmanenko (EPAM) requested to merge fix-http-client-for-J17 into master


  • Required for migration to Java 17.
  • Does not migrate core-common to Java 17, it will be kept with Java 8.
  • Refactoring of AbstractHttpClient to switch from HttpURLConnection to Apache HTTP Client. For Patch requests support reflection access was used for the final static fields of HttpURLConnection (link), causing:
Caused by: java.lang.NoSuchFieldException: modifiers
	at java.base/java.lang.Class.getDeclaredField(
	at org.opengroup.osdu.core.common.http.AbstractHttpClient.supportPatchMethod(

How to test:

via Unit test

Changes include:

  • Nonbreaking change.

Changes in:

  • Common code

Dev Checklist:

  • Added Unit Tests, wherever applicable.
  • Updated the Readme, if applicable.
  • Existing Tests pass
  • Verified functionality locally
  • Self Reviewed my code for formatting and complex business logic.
Edited by Rustam Lotsmanenko (EPAM)

Merge request reports