[Cryptofacilities] CryptoFacilitiesDigest - Java 11 code fails in Java 8 environment
See original GitHub issueSeems like Java 11 code was introduced in CryptoFacilitiesDigest: https://github.com/knowm/XChange/blob/e28c9b066768dbb2a4800d7b8a067b503d73ae4f/xchange-cryptofacilities/src/main/java/org/knowm/xchange/cryptofacilities/service/CryptoFacilitiesDigest.java#L52
It fails in Java 8 env.
XChange v5.0.8
error: java.net.URLDecoder.decode(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String;
java.lang.NoSuchMethodError: java.net.URLDecoder.decode(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String;
at org.knowm.xchange.cryptofacilities.service.CryptoFacilitiesDigest.digestParams(CryptoFacilitiesDigest.java:50)
at si.mazi.rescu.Params.digestAll(Params.java:203)
at si.mazi.rescu.RestInvocation.lambda$new$1(RestInvocation.java:93)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1556)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
at si.mazi.rescu.RestInvocation.<init>(RestInvocation.java:93)
at si.mazi.rescu.RestInvocation.create(RestInvocation.java:139)
at si.mazi.rescu.RestInvocationHandler.createInvocation(RestInvocationHandler.java:182)
at si.mazi.rescu.RestInvocationHandler.invoke(RestInvocationHandler.java:110)
at com.sun.proxy.$Proxy15.accounts(unknown)
at org.knowm.xchange.cryptofacilities.service.CryptoFacilitiesAccountServiceRaw.getCryptoFacilitiesAccounts(CryptoFacilitiesAccountServiceRaw.java:24)
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (10 by maintainers)
Top Results From Across the Web
Java Cryptography Architecture (JCA) Reference Guide
An engine class provides the interface to a specific type of cryptographic service, independent of a particular cryptographic algorithm or provider. The engines ......
Read more >1882168 – java-11-openjdk / rhel-8: system crypto policy fails ...
Problem: System crypto policy fails to increase DH key size [1], based on crypto policy requirements [2]. Seems like crypto-policies are actually trying...
Read more >Java 8 release changes
Java 8 Release Highlights. This article applies to: Java version(s): 8.0. This page highlights changes impacting end users for each Java release.
Read more >Why java.security.NoSuchProviderException No such provider
I suppose the Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); forces the "BC" and the Cipher.getInstance( ...
Read more >Java SDK fixes, version 8.0 - IBM
Java 8 fixes list. ... IOEXCEPTION: FAILED VALIDATING CERTIFICATE PATHS ... BAD PARAMETER IN DHPKCS11PUBLICKEY CREATION BY IBMPKCS11IMPL CRYPTO PROVIDER ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As this issue illustrated at the moment we only ensure Java 8 bytecode compatibility - which means:
@timmolter as I understand your response Android despite requiring Java 8 bytecode provides many APIs from Java 9 an higher, yes?
If so then I’m sorry @sizmestiev but if your stuck with using Java 8 on the server then you must be already used to running old versions of unsupported libraries and components on it. There are many option available to you to remedy your situation like for example using containers and microservices if you want to use the latest version of Xchange. Android to me is the only valid reason for such extreme backward compatibility as Java 8 and as @timmolter stated this library in its current form can run on Android while leveraging newer APIs.
if so then the Java 8 CI build must be restored - without it we wont detect which PRs use APIs that are from Java 9 and above
the Java versions mentioned in pom does not check for that - they only ensure bytecode compatibility