Description
I would like to request support for Java 17 compatibility for this library. Currently, the library uses DatatypeConverter.parseHexBinary, which is not available in Java 17. This method is often used for converting hexadecimal strings to byte arrays, which is a common requirement.
Steps to Reproduce
- Attempt to use DatatypeConverter.parseHexBinary in a Java 17 project.
- Observe that the method is not available and results in a compilation error.
Suggested Solution
To ensure compatibility with Java 17 and above, and to avoid unnecessary coupling with the jakarta.xml.bind library, I suggest removing this dependency from the project. Instead, consider using the HexFormat class available in Java 17 or providing a custom utility method for earlier versions.
|
byte[] keyBytes = DatatypeConverter.parseHexBinary(this.key); |
Here is a proposed to change method that can be used for versions prior to Java 17:
byte[] keyBytes = HexFormat.of().parseHex(this.key);
Remove not necessary dependency at pom.xml file.
|
<dependency> |
|
<groupId>jakarta.xml.bind</groupId> |
|
<artifactId>jakarta.xml.bind-api</artifactId> |
|
<version>3.0.1</version> |
|
</dependency> |
Description
I would like to request support for Java 17 compatibility for this library. Currently, the library uses
DatatypeConverter.parseHexBinary, which is not available in Java 17. This method is often used for converting hexadecimal strings to byte arrays, which is a common requirement.Steps to Reproduce
Suggested Solution
To ensure compatibility with Java 17 and above, and to avoid unnecessary coupling with the
jakarta.xml.bindlibrary, I suggest removing this dependency from the project. Instead, consider using the HexFormat class available in Java 17 or providing a custom utility method for earlier versions.EdgeAuth-Token-Java/src/main/java/com/akamai/edgeauth/EdgeAuth.java
Line 301 in 07be81e
Here is a proposed to change method that can be used for versions prior to Java 17:
Remove not necessary dependency at
pom.xmlfile.EdgeAuth-Token-Java/pom.xml
Lines 36 to 40 in 07be81e