Skip to content

Commit b9898fe

Browse files
committed
Fix test
1 parent 1d56059 commit b9898fe

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

codegen/src/main/java/org/web3j/codegen/unit/gen/MethodFilter.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public static List<Method> extractValidMethods(Class contract) {
3737
&& parametersAreMatching(m)
3838
&& !m.getName().toLowerCase().contains("event")
3939
&& !m.getName().equals("load")
40-
&& !m.getName().equals("kill"))
40+
&& !m.getName().equals("kill")
41+
&& !m.getName().equals("linkLibraries"))
4142
.collect(Collectors.toList());
4243
}
4344

codegen/src/test/java/org/web3j/codegen/SolidityFunctionWrapperGeneratorTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ private void compareJavaFile(String inputFileName) throws Exception {
218218
"java",
219219
inputFileName + ".java"),
220220
File.separator));
221-
assertEquals(
222-
new String(Files.readAllBytes(fileExpected.toPath())).replaceAll("(\r\n|\n)", ""),
223-
new String(Files.readAllBytes(fileActual.toPath())).replaceAll("(\r\n|\n)", ""));
221+
String s1 = new String(Files.readAllBytes(fileExpected.toPath()));
222+
String s2 = new String(Files.readAllBytes(fileActual.toPath()));
223+
assertEquals(s1.replaceAll("(\r\n|\n)", ""), s2.replaceAll("(\r\n|\n)", ""));
224224
}
225225

226226
private void testCodeGenerationJvmTypes(String contractName, String inputFileName)

codegen/src/test/resources/solidity/arraysinstruct/build/java/ArraysInStruct.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040
@SuppressWarnings("rawtypes")
4141
public class ArraysInStruct extends Contract {
42-
public static final String BINARY = "Bin file was not provided";
42+
public static String BINARY = "Bin file was not provided";
4343

4444
public static final String FUNC_CALLFUNCTION = "callFunction";
4545

codegen/src/test/resources/solidity/eventparameters/build/java/EventParameters.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*/
3838
@SuppressWarnings("rawtypes")
3939
public class EventParameters extends Contract {
40-
public static final String BINARY = "Bin file was not provided";
40+
public static String BINARY = "Bin file was not provided";
4141

4242
public static final String FUNC__CONTRACTNUMBER = "_contractNumber";
4343

codegen/src/test/resources/solidity/onlyinarraystruct/build/java/OnlyInArrayStruct.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131
@SuppressWarnings("rawtypes")
3232
public class OnlyInArrayStruct extends Contract {
33-
public static final String BINARY = "Bin file was not provided";
33+
public static String BINARY = "Bin file was not provided";
3434

3535
public static final String FUNC_GETFOO = "getFoo";
3636

core/src/main/java/org/web3j/protocol/core/methods/response/Transaction.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,11 @@ public int hashCode() {
615615
+ (getMaxFeePerBlobGasRaw() != null
616616
? getMaxFeePerBlobGasRaw().hashCode()
617617
: 0);
618-
result = 31 * result + (getBlobVersionedHashes() != null ? getBlobVersionedHashes().hashCode() : 0);
618+
result =
619+
31 * result
620+
+ (getBlobVersionedHashes() != null
621+
? getBlobVersionedHashes().hashCode()
622+
: 0);
619623
result = 31 * result + (getAccessList() != null ? getAccessList().hashCode() : 0);
620624
return result;
621625
}

0 commit comments

Comments
 (0)