From e3202e5afc36f724a325d521d2c086103463690a Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Thu, 29 Feb 2024 20:29:48 +0100 Subject: [PATCH 1/2] switch back to Java 8 to ensure Android compatbility --- pom.xml | 14 +++++++++++++- .../net/osslabz/evm/abi/decoder/AbiDecoder.java | 7 ++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 6ee6234..655cb30 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ UTF-8 - 17 + 8 ${osslabz.encoding} ${osslabz.encoding} @@ -26,6 +26,18 @@ 2.16.1 + + + + org.apache.maven.plugins + maven-compiler-plugin + + 11 + 11 + + + + diff --git a/src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java b/src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java index 092a629..046866b 100644 --- a/src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java +++ b/src/main/java/net/osslabz/evm/abi/decoder/AbiDecoder.java @@ -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; @@ -20,7 +21,7 @@ public class AbiDecoder { Map 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(); } @@ -111,4 +112,4 @@ public List decodeFunctionsCalls(String inputData) { } return resolvedCalls; } -} +} \ No newline at end of file From 4b42f59cc213ba960d5caf95dfa41bfd30b44f1f Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Thu, 29 Feb 2024 20:31:39 +0100 Subject: [PATCH 2/2] switch back to Java 8 to ensure Android compatbility --- pom.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pom.xml b/pom.xml index 655cb30..e0f9a5f 100644 --- a/pom.xml +++ b/pom.xml @@ -26,18 +26,6 @@ 2.16.1 - - - - org.apache.maven.plugins - maven-compiler-plugin - - 11 - 11 - - - -