Skip to content

Commit

Permalink
Merge pull request #87 from osslabz/feature/android-compatibility
Browse files Browse the repository at this point in the history
switch back to Java 8 to ensure Android compatbility
  • Loading branch information
rvullriede authored Jun 21, 2024
2 parents 3d8cabe + 4b42f59 commit 0c54675
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<properties>
<osslabz.encoding>UTF-8</osslabz.encoding>
<osslabz.java.version>17</osslabz.java.version>
<osslabz.java.version>8</osslabz.java.version>

<project.build.sourceEncoding>${osslabz.encoding}</project.build.sourceEncoding>
<project.reporting.outputEncoding>${osslabz.encoding}</project.reporting.outputEncoding>
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Expand All @@ -20,7 +21,7 @@ public class AbiDecoder {
Map<String, AbiDefinition.Entry> methodSignatures = new HashMap<>();

public AbiDecoder(String abiFilePath) throws IOException {
this.abi = AbiDefinition.fromJson(Files.readString(Path.of(abiFilePath)));
this.abi = AbiDefinition.fromJson(new String(Files.readAllBytes(Paths.get(abiFilePath)), StandardCharsets.UTF_8));
init();
}

Expand Down Expand Up @@ -111,4 +112,4 @@ public List<DecodedFunctionCall> decodeFunctionsCalls(String inputData) {
}
return resolvedCalls;
}
}
}

0 comments on commit 0c54675

Please sign in to comment.