diff --git a/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java b/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java index 95e1a1ef1..fb122d59a 100644 --- a/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java +++ b/codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java @@ -128,9 +128,8 @@ public final void generate() throws IOException, ClassNotFoundException { } List functionDefinitions = loadContractDefinition(abiFile); - if (functionDefinitions.isEmpty()) { - exitError("Unable to parse input ABI file"); - } else { + if (!functionDefinitions.isEmpty()) { + String className = Strings.capitaliseFirstLetter(contractName); System.out.print("Generating " + basePackageName + "." + className + " ... "); @@ -149,6 +148,8 @@ public final void generate() throws IOException, ClassNotFoundException { null); System.out.println("File written to " + destinationDirLocation.toString() + "\n"); + } else { + System.out.println("Ignoring empty ABI file: " + abiFile.getName() + ".abi" + "\n"); } }