Skip to content

Commit c619862

Browse files
committed
removed weird conversion to string and back (under potentially different encodings)
1 parent 5d60ff0 commit c619862

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/factsmission/psps/RepositoryProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ protected void loadStuffToGraph(URL stuffURL, String path, String rdfType) throw
103103
String contentBase64 = (String) jsonObject.get("content");
104104
if (contentBase64 != null) {
105105
try {
106-
String content = new String(Base64.getMimeDecoder().decode(contentBase64));
107-
try ( InputStream contentInputStream = new ByteArrayInputStream(content.getBytes("utf-8"))) {
106+
byte[] content = Base64.getMimeDecoder().decode(contentBase64);
107+
try ( InputStream contentInputStream = new ByteArrayInputStream(content)) {
108108
IRI baseIRI = constructFileBaseIRI(path);
109109
if (supressFileExtension) {
110110
baseIRI = supressExtension(baseIRI);

0 commit comments

Comments
 (0)