Skip to content

Commit

Permalink
Addressed java.xml.bind issues as part of JEP 320 for Java 11.
Browse files Browse the repository at this point in the history
As part of processing#5753 / processing#5750, migrates base 64 binary image data loading away from java.xml.bind as Java 11 has removed the deprecated module [JEP 320](As part of processing#5753 / processing#5750).
  • Loading branch information
sampottinger committed Jan 22, 2019
1 parent a12fa6a commit f170faf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/processing/core/PShape.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import java.util.Map;

import javax.swing.ImageIcon;
import javax.xml.bind.DatatypeConverter;
import java.util.Base64;


/**
Expand Down Expand Up @@ -1915,7 +1915,7 @@ private void loadBase64Image(){
String extension = parts[0].substring(11);
String encodedData = parts[1];

byte[] decodedBytes = DatatypeConverter.parseBase64Binary(encodedData);
byte[] decodedBytes = Base64.getDecoder().decode(encodedData);

if(decodedBytes == null){
System.err.println("Decode Error on image: " + imagePath.substring(0, 20));
Expand Down

0 comments on commit f170faf

Please sign in to comment.