cf-java-client icon indicating copy to clipboard operation
cf-java-client copied to clipboard

Housekeeping: allow more jdks to be used, fixes #1314

Open Lokowandtg opened this issue 2 months ago • 4 comments

JDK 25 is a new LTS-version, so we might add it to the java matix. Changes in java module system require some more explicit dependencies, some of which break build in older JDKs. So the dependencies are in their own profile. Also the "annotationProcessorPaths" needs to be defined explicitly for later JDKs.

Rules for javadoc generation are now stricter, resulting in errors where previously only warnings where shown.

In "maven-compiler-plugin, "source" and "target" are allways defined as the major java version. ${java.specification.version} ${java.specification.version} We might consider to set the source version always to "1.8" to avoid breaking builds in Java 8 when a developer accidentially uses features from later java versions. The target should remain the currently used JDK.

Lokowandtg avatar Nov 18 '25 18:11 Lokowandtg

Question: have you run the integration tests with your changes?

Kehrlann avatar Nov 24 '25 18:11 Kehrlann

Question: have you run the integration tests with your changes?

Usually I execute this integration-test: org.cloudfoundry.client.v2.InfoTest, but I did not try all JDKs. Will try tomorrow...

Lokowandtg avatar Nov 25 '25 23:11 Lokowandtg

@Lokowandtg I don't think we should support non-LTS JDKs. So 17, 21 and 25 are the current targets. I wouldn't make any changes re: JDK 22-23-24.

Since there are bigger issues with JDK 25, we'll have to work on that for 6.0.0

Kehrlann avatar Nov 26 '25 09:11 Kehrlann

Good that you asked for running the tests. Now the v2.infoTest runs in all tested JDKs: 8, 11, 17, 21, 22, 24, 25. The additional dependency-declarations where required for building in JDK22-25. To run the integration tests, I needed to cherry-pick this pull request for JDKs17+: https://github.com/cloudfoundry/cf-java-client/pull/1247

And for my local CF instance I needed to cherry-pick the UAA rate limiting code: https://github.com/cloudfoundry/cf-java-client/pull/1313

Lokowandtg avatar Nov 27 '25 16:11 Lokowandtg