Skip to content

Replace use of javax.xml.bind.DatatypeConverter #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

fiveop
Copy link
Contributor

@fiveop fiveop commented Nov 15, 2020

DatatypeConverter was deprecated in Java 9 and has been removed in Java 11. Instead of DatatypeConverter#printHexBinary we use the equivalent method Hex#encodeHexString from the commons-codec library, which we already require anyway (see build.sh).

(My problem is, that I need to run Arduino IDE on Java 11 (or maybe 10), because otherwise the Serial Monitor won't work, and I need to run Arduino IDE on Java 8 (or maybe 9), to upload certificates via this plug-in. Since my change should make it work on all Java versions, I thought it would be a useful contribution.)

DatatypeConverter was deprecated in Java 9 and has been removed in Java
11. Instead of DatatypeConverter#printHexBinary we use the equivalent method
Hex#encodeHexString from the commons-codec library, which we already
require anyway (see build.sh).
Copy link
Contributor

@aentinger aentinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @fiveop for your contribution 🚀 Certainly very useful 👍

@aentinger aentinger merged commit 9606cc6 into arduino:master Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants