Closed olamy closed 2 years ago
Thank you very much for your contribution. I see now the problem. Indeed, I had used the newest JDK for build, but the method Math.floorDiv(long, int) only exists since Java 9, different from the overloaded methods Math.floorDiv(long, long) or Math.floorDiv(int, int).
See also this SO-post.
Just a curious question before I merge your contribution: Do you absolutely need Java 8 as target, or can you also use a future version of Time4J starting with at least Java 9 (for better module support)?
Anyway, Time4J-v5.9.1 will contain your fix and remain compatible with Java 8.
Thank you very much for your contribution. I see now the problem. Indeed, I had used the newest JDK for build, but the method Math.floorDiv(long, int) only exists since Java 9, different from the overloaded methods Math.floorDiv(long, long) or Math.floorDiv(int, int).
See also this SO-post.
I know this as I'm maintaining the m-compiler-p ;)
I made the change very simple as it looks you are using java 11 locally.
for sure the best option is to use a profile etc... (but only if you keep using java8 for building your project).
You can make java 11 mandatory for building but still targeting java 8 using the release
flag of the compiler.
It's really up2u :)
Just a curious question before I merge your contribution: Do you absolutely need Java 8 as target, or can you also use a future version of Time4J starting with at least Java 9 (for better module support)?
Anyway, Time4J-v5.9.1 will contain your fix and remain compatible with Java 8.
I was looking at this because of investigating this one https://github.com/jenkinsci/ldap-plugin/pull/135 to fix it I will need java 8 as Jenkins is still java 8 but only for few weeks so it doesn't matter really :) again it's up2u to make your library java11 mandatory. My 2 cts: do you need some java11 only code in your library? if not just target java8.
Thanks again for your contribution and detailed reply.
When using 5.9 release with jdk 1.8. There is the following error:
You have probably release the jars using java9+. Too avoid such issues you should add the release following configuration for m-compiler-p
<release>8</release>