Skip to content

Draft: Java 17 migration

Rustam Lotsmanenko (EPAM) requested to merge java17-migration into master

Description:

  • Migration to Java 17.
  • Refactoring of AbstractHttpClient to switch from HttpURLConnection to new HttpClient. 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(Class.java:2610)
	at org.opengroup.osdu.core.common.http.AbstractHttpClient.supportPatchMethod(AbstractHttpClient.java:131)
  • Partial test migration from Powermock to updated Mockito. Powermock uses illegal JDK reflection accesses not supported in jdk 12+ and does not get updates. PowerMockRunner in Junit was replaced with MockitoJUnitRunner.

How to test:

via Unit test

Changes include:

  • Breaking change (a change that is not backward-compatible and/or changes current functionality).

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