gradle modifications to support java 19 (#4797)

* gradle modifications to support java 19

Signed-off-by: lukelee-sl <luke.lee@swirldslabs.com>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
pull/4799/head
lukelee-sl 2 years ago committed by GitHub
parent 72387a5b8c
commit 609904e509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      build.gradle
  2. 8
      ethereum/api/src/integration-test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcResponseUtils.java
  3. 8
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/BlockBody.java
  4. 4
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/LogsBloomFilterTestCaseSpec.java
  5. 4
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/RespondingEthPeer.java
  6. 8
      ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/rlpx/connections/netty/NettyConnectionInitializer.java
  7. 8
      ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/PeerTestHelper.java
  8. 4
      ethereum/rlp/src/main/java/org/hyperledger/besu/ethereum/rlp/RLPDecodingHelpers.java
  9. 4
      ethereum/trie/src/main/java/org/hyperledger/besu/ethereum/trie/RestoreVisitor.java
  10. 4
      ethereum/trie/src/main/java/org/hyperledger/besu/ethereum/trie/StoredNode.java
  11. 87
      gradle/verification-metadata.xml
  12. 2
      gradle/wrapper/gradle-wrapper.properties
  13. 4
      services/tasks/src/main/java/org/hyperledger/besu/services/tasks/CachingTaskCollection.java

@ -20,7 +20,7 @@ import net.ltgt.gradle.errorprone.CheckSeverity
import java.text.SimpleDateFormat
plugins {
id 'com.diffplug.spotless' version '6.10.0'
id 'com.diffplug.spotless' version '6.12.0'
id 'com.github.ben-manes.versions' version '0.42.0'
id 'com.github.hierynomus.license' version '0.16.1-fix'
id 'com.jfrog.artifactory' version '4.28.3'
@ -83,7 +83,7 @@ allprojects {
version = rootProject.version
jacoco {
toolVersion = '0.8.7'
toolVersion = '0.8.8'
if (project.tasks.findByName('referenceTests')) {
applyTo referenceTests
}
@ -131,7 +131,7 @@ allprojects {
target 'src/**/*.java'
targetExclude '**/src/reference-test/**', '**/src/main/generated/**', '**/src/test/generated/**', '**/src/jmh/generated/**'
removeUnusedImports()
googleJavaFormat('1.10.0')
googleJavaFormat('1.15.0')
importOrder 'org.hyperledger', 'java', ''
trimTrailingWhitespace()
endWithNewline()

@ -67,12 +67,16 @@ public class JsonRpcResponseUtils {
/** Hex is base 16 */
private static final int HEX_RADIX = 16;
/** @param values hex encoded values. */
/**
* @param values hex encoded values.
*/
public JsonRpcResponse response(final Map<JsonRpcResponseKey, String> values) {
return response(values, new ArrayList<>());
}
/** @param values hex encoded values. */
/**
* @param values hex encoded values.
*/
public JsonRpcResponse response(
final Map<JsonRpcResponseKey, String> values, final List<TransactionResult> transactions) {

@ -38,13 +38,17 @@ public class BlockBody implements org.hyperledger.besu.plugin.data.BlockBody {
return EMPTY;
}
/** @return The list of transactions of the block. */
/**
* @return The list of transactions of the block.
*/
@Override
public List<Transaction> getTransactions() {
return transactions;
}
/** @return The list of ommers of the block. */
/**
* @return The list of ommers of the block.
*/
@Override
public List<BlockHeader> getOmmers() {
return ommers;

@ -51,7 +51,9 @@ public class LogsBloomFilterTestCaseSpec {
return logs;
}
/** @return - 2048-bit representation of each log entry, except data, of each transaction. */
/**
* @return - 2048-bit representation of each log entry, except data, of each transaction.
*/
public LogsBloomFilter getLogsBloomFilter() {
return logsBloomFilter;
}

@ -189,7 +189,9 @@ public class RespondingEthPeer {
}
}
/** @return True if any requests were processed */
/**
* @return True if any requests were processed
*/
public boolean respond(final Responder responder) {
// Respond to queued messages
final List<OutgoingMessage> currentMessages = new ArrayList<>();

@ -193,7 +193,9 @@ public class NettyConnectionInitializer
return connectionFuture;
}
/** @return a channel initializer for outbound connections */
/**
* @return a channel initializer for outbound connections
*/
@Nonnull
private ChannelInitializer<SocketChannel> outboundChannelInitializer(
final Peer peer, final CompletableFuture<PeerConnection> connectionFuture) {
@ -211,7 +213,9 @@ public class NettyConnectionInitializer
};
}
/** @return a channel initializer for inbound connections */
/**
* @return a channel initializer for inbound connections
*/
private ChannelInitializer<SocketChannel> inboundChannelInitializer() {
return new ChannelInitializer<SocketChannel>() {
@Override

@ -43,14 +43,18 @@ public class PeerTestHelper {
return EnodeURLImpl.builder().ipAddress("127.0.0.1").useDefaultPorts().nodeId(Peer.randomId());
}
/** @return A LocalNode that is setup and ready. */
/**
* @return A LocalNode that is setup and ready.
*/
public static LocalNode createLocalNode() {
final MutableLocalNode localNode = createMutableLocalNode();
localNode.setEnode(enode());
return localNode;
}
/** @return A MutableLocalNode that is not ready (the enode has not been set). */
/**
* @return A MutableLocalNode that is not ready (the enode has not been set).
*/
public static MutableLocalNode createMutableLocalNode() {
return MutableLocalNode.create("clientId", 5, Arrays.asList(Capability.create("eth", 63)));
}

@ -181,7 +181,9 @@ class RLPDecodingHelpers {
this.payloadSize = payloadSize;
}
/** @return the size of the byte string holding the rlp-encoded value and metadata */
/**
* @return the size of the byte string holding the rlp-encoded value and metadata
*/
int getEncodedSize() {
final long encodedSize = elementEnd() - elementStart + 1;
try {

@ -145,7 +145,9 @@ public class RestoreVisitor<V> implements PathNodeVisitor<V> {
this.refRlp = refRlp;
}
/** @return True if the node needs to be persisted. */
/**
* @return True if the node needs to be persisted.
*/
@Override
public boolean isDirty() {
return false;

@ -34,7 +34,9 @@ class StoredNode<V> implements Node<V> {
this.hash = hash;
}
/** @return True if the node needs to be persisted. */
/**
* @return True if the node needs to be persisted.
*/
@Override
public boolean isDirty() {
return false;

@ -38,6 +38,11 @@
<sha256 value="28133adbcc378692339f87f329593291d9e30679abc29b01542ce650b8c7a0be" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.diffplug.spotless" name="com.diffplug.spotless.gradle.plugin" version="6.12.0">
<artifact name="com.diffplug.spotless.gradle.plugin-6.12.0.pom">
<sha256 value="05166d4bbee1d14f23bba04bc11ed11829af8652bc25b7b8ba1061246b0f1a94" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.diffplug.spotless" name="spotless-eclipse-base" version="3.5.2">
<artifact name="spotless-eclipse-base-3.5.2.jar">
<sha256 value="e381d6996a3d7f41c02d79bd0b1dff077aaec40b55fa15971c1bb45ab16f5a20" origin="Generated by Gradle"/>
@ -68,6 +73,14 @@
<sha256 value="46dcbbc2d7d7d1de3b9526685faeae036d1bfd7c2bbe12f78b322e0f5c4b564f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.diffplug.spotless" name="spotless-lib" version="2.31.0">
<artifact name="spotless-lib-2.31.0.jar">
<sha256 value="679e2952bcc8cdafe5dccac6c3dfbe5b9c7e8aaa4bf930ed5cd7063ec7979ffb" origin="Generated by Gradle"/>
</artifact>
<artifact name="spotless-lib-2.31.0.module">
<sha256 value="5e1d6c4df21aa76ab146cb818526a646ed5595f9b34999b819f35890e524652c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.diffplug.spotless" name="spotless-lib-extra" version="2.29.0">
<artifact name="spotless-lib-extra-2.29.0.jar">
<sha256 value="9b4ce98aa4f5dbc75850fe6d9a79e878d318be718f997e5ea4052c885621baab" origin="Generated by Gradle"/>
@ -76,6 +89,14 @@
<sha256 value="416e3896e6f067f597948ef44150c9938df057a342b77d57db482a8f969681e8" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.diffplug.spotless" name="spotless-lib-extra" version="2.31.0">
<artifact name="spotless-lib-extra-2.31.0.jar">
<sha256 value="9b4ce98aa4f5dbc75850fe6d9a79e878d318be718f997e5ea4052c885621baab" origin="Generated by Gradle"/>
</artifact>
<artifact name="spotless-lib-extra-2.31.0.module">
<sha256 value="b5f3ee1635ae44bb2c575b7d11bfca78aece019e4b9b74419300aa792dc5b58c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.diffplug.spotless" name="spotless-plugin-gradle" version="6.10.0">
<artifact name="spotless-plugin-gradle-6.10.0.jar">
<sha256 value="a7c3fc8ce15d937d75005b2e49c9665dda7651f2d22e4eca9fb1b4dde47bf40b" origin="Generated by Gradle"/>
@ -84,6 +105,14 @@
<sha256 value="9ba8ff79f3230ece6b6689828ac852a2bfa96d997c2572a3adeef0b6b15c92ad" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.diffplug.spotless" name="spotless-plugin-gradle" version="6.12.0">
<artifact name="spotless-plugin-gradle-6.12.0.jar">
<sha256 value="54293b86170b821115772090bb90aeb466cda6bf9e08b06bacbd3bb94a714e1f" origin="Generated by Gradle"/>
</artifact>
<artifact name="spotless-plugin-gradle-6.12.0.module">
<sha256 value="14831f1ebf9c7d8e1ba344d55276f87371e0fcac4c08000c618688c3190129f8" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml" name="oss-parent" version="28">
<artifact name="oss-parent-28.pom">
<sha256 value="c4c369e36b8820ad26d2e6c70ff44ad99efafe19399a5d1178e9ea82f4d2fd38" origin="Generated by Gradle"/>
@ -1081,6 +1110,14 @@
<sha256 value="06184e9b059e080911827136af5ec78f57ee4c3bc19f632eb561b0df8f8788ce" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.googlecode.javaewah" name="JavaEWAH" version="1.1.13">
<artifact name="JavaEWAH-1.1.13.jar">
<sha256 value="4c0fda2b1d317750d7ea324e36c70b2bc48310c0aaae67b98df0915d696d7111" origin="Generated by Gradle"/>
</artifact>
<artifact name="JavaEWAH-1.1.13.pom">
<sha256 value="9725b1fe9c6810d977750bb84415ea1082c4b488d4a839f9704bb4f5e8fc17f4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.graphql-java" name="graphql-java" version="19.2">
<artifact name="graphql-java-19.2.jar">
<sha256 value="905d695a4e69140cc8ef1ddc70e34f6e3d89cf6c111a0bfe778ec7b698b20692" origin="Generated by Gradle"/>
@ -3750,6 +3787,14 @@
<sha256 value="a8417745cfa2d95d6a9711e9413fca984fc5666b7627bad1540cf27d462ae813" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.jgit" name="org.eclipse.jgit" version="5.13.1.202206130422-r">
<artifact name="org.eclipse.jgit-5.13.1.202206130422-r.jar">
<sha256 value="d679365a6c8e55c1496701099f5e5765433f68dcb659759416ba5b222eb5055c" origin="Generated by Gradle"/>
</artifact>
<artifact name="org.eclipse.jgit-5.13.1.202206130422-r.pom">
<sha256 value="3cc4bebf9c936578eae2b6d24fb2a912d89993a54fd0e2fbc1c8abc049878515" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.jgit" name="org.eclipse.jgit-parent" version="4.4.1.201607150455-r">
<artifact name="org.eclipse.jgit-parent-4.4.1.201607150455-r.pom">
<sha256 value="a774a480555c512a6aa38ee3ff4d059954d478bbe1e9007dcd115dcf809a18a3" origin="Generated by Gradle"/>
@ -3760,6 +3805,11 @@
<sha256 value="a18fd7d0c41fda8d8f1c4a24b5000a866456147a24746ee6cc4731e788a18dee" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.jgit" name="org.eclipse.jgit-parent" version="5.13.1.202206130422-r">
<artifact name="org.eclipse.jgit-parent-5.13.1.202206130422-r.pom">
<sha256 value="de65fc76ed8f44a57785ee164918dc3d4f55ee3fea6a47bc7cb1baa19ef1bc83" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.platform" name="org.eclipse.core.commands" version="3.10.100">
<artifact name="org.eclipse.core.commands-3.10.100.jar">
<sha256 value="177c605efd78681e28765b869a2ff5284a79b02d133007a6169a64317cee8633" origin="Generated by Gradle"/>
@ -4052,6 +4102,14 @@
<sha256 value="e7b2cdd2df3a6bc239a231b1775be09e50b748e9c388579fb3ea4f990357722f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.agent" version="0.8.8">
<artifact name="org.jacoco.agent-0.8.8.jar">
<sha256 value="072ecbd496896623899a696fff12c01c1615f737616d2792e6d0e10cdf8a610d" origin="Generated by Gradle"/>
</artifact>
<artifact name="org.jacoco.agent-0.8.8.pom">
<sha256 value="7dd13c80aff315032983357c650a887d6fdb4c8a8870b207bb4802c49809e7b4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.ant" version="0.8.7">
<artifact name="org.jacoco.ant-0.8.7.jar">
<sha256 value="97ca96a382c3f23a44d8eb4c4e6c3742a30cb8005774a76ced0fc4806ce49605" origin="Generated by Gradle"/>
@ -4060,11 +4118,24 @@
<sha256 value="a6084588725cf7e9f28372d5f73eb90ea95ef91976f128fa8059f946831b1fb8" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.ant" version="0.8.8">
<artifact name="org.jacoco.ant-0.8.8.jar">
<sha256 value="02e33bd2c48dc0be67c2fea84d43beececfd400da6797c58153253d4c30aca15" origin="Generated by Gradle"/>
</artifact>
<artifact name="org.jacoco.ant-0.8.8.pom">
<sha256 value="fafff75819609030f4626509313c0861428c2c26c8d36e9a8938334a04478909" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.build" version="0.8.7">
<artifact name="org.jacoco.build-0.8.7.pom">
<sha256 value="83408107930e1683a9b7647da7ab75eb83d80fa470c1641b79b5aecbbef1b783" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.build" version="0.8.8">
<artifact name="org.jacoco.build-0.8.8.pom">
<sha256 value="f4ce0b1285fd24fc6c772f42857298315904dde8fd5677267a0fad5ff9ce2aef" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.core" version="0.8.7">
<artifact name="org.jacoco.core-0.8.7.jar">
<sha256 value="ad7739b5fb5969aa1a8aead3d74ed54dc82ed012f1f10f336bd1b96e71c1a13c" origin="Generated by Gradle"/>
@ -4073,6 +4144,14 @@
<sha256 value="6832c751d8cd6071af646fde63baa13bdd183693fd60f7757f68536e5f867825" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.core" version="0.8.8">
<artifact name="org.jacoco.core-0.8.8.jar">
<sha256 value="474c782f809d88924713dfdbf0acb79d330f904be576484803463d0465611643" origin="Generated by Gradle"/>
</artifact>
<artifact name="org.jacoco.core-0.8.8.pom">
<sha256 value="f5fab5a48df823b83c0ea35026032368cc9b81800efb257cc7a5928298fee225" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.report" version="0.8.7">
<artifact name="org.jacoco.report-0.8.7.jar">
<sha256 value="cc89258623700a6c932592153cb528785876b6da183d5431f97efbba6f020e5b" origin="Generated by Gradle"/>
@ -4081,6 +4160,14 @@
<sha256 value="2fbbc19e3c1dd791a2252efa829d926a7988793e9b78c0b26abc98492950c4ba" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jacoco" name="org.jacoco.report" version="0.8.8">
<artifact name="org.jacoco.report-0.8.8.jar">
<sha256 value="2c129110f3e3fcaa1f8179578ea3894586199cb0826be5c7790278084c9622a9" origin="Generated by Gradle"/>
</artifact>
<artifact name="org.jacoco.report-0.8.8.pom">
<sha256 value="5213af2916bb2690be871917d82a0f9c2ba1e88b796a59343fc03df8ae138716" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.java-websocket" name="Java-WebSocket" version="1.5.2">
<artifact name="Java-WebSocket-1.5.2.jar">
<sha256 value="ff869d198a8dc5d00967392e187aeda93b833b7cdd3bccefb3d7fb5834098b85" origin="Generated by Gradle"/>

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

@ -92,7 +92,9 @@ public class CachingTaskCollection<T> implements TaskCollection<T> {
return size() == 0;
}
/** @return True if all tasks have been removed and processed. */
/**
* @return True if all tasks have been removed and processed.
*/
@Override
public synchronized boolean allTasksCompleted() {
return cacheSize() == 0 && wrappedCollection.allTasksCompleted();

Loading…
Cancel
Save