build: Add default constructor and javadoc for :besu (#7061)

* build - Fix gradle build for Java 21 for besu subproject. 

---------

Signed-off-by: Usman Saleem <usman@usmans.info>
pull/7072/head
Usman Saleem 7 months ago committed by GitHub
parent 9d08b34ec9
commit a7e5548135
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      besu/src/main/java/org/hyperledger/besu/Besu.java
  2. 3
      besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java
  3. 3
      besu/src/main/java/org/hyperledger/besu/chainimport/RlpBlockImporter.java
  4. 2
      besu/src/main/java/org/hyperledger/besu/cli/ConfigurationOverviewBuilder.java
  5. 1
      besu/src/main/java/org/hyperledger/besu/cli/NetworkDeprecationMessage.java
  6. 9
      besu/src/main/java/org/hyperledger/besu/cli/config/EthNetworkConfig.java
  7. 3
      besu/src/main/java/org/hyperledger/besu/cli/converter/DurationMillisConverter.java
  8. 3
      besu/src/main/java/org/hyperledger/besu/cli/converter/FractionConverter.java
  9. 3
      besu/src/main/java/org/hyperledger/besu/cli/converter/MetricCategoryConverter.java
  10. 2
      besu/src/main/java/org/hyperledger/besu/cli/converter/PercentageConverter.java
  11. 2
      besu/src/main/java/org/hyperledger/besu/cli/converter/PluginInfoConverter.java
  12. 2
      besu/src/main/java/org/hyperledger/besu/cli/converter/PositiveNumberConverter.java
  13. 2
      besu/src/main/java/org/hyperledger/besu/cli/custom/RpcAuthFileValidator.java
  14. 4
      besu/src/main/java/org/hyperledger/besu/cli/error/BesuExecutionExceptionHandler.java
  15. 2
      besu/src/main/java/org/hyperledger/besu/cli/logging/BesuLoggingConfigurationFactory.java
  16. 2
      besu/src/main/java/org/hyperledger/besu/cli/options/OptionParser.java
  17. 2
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/ApiConfigurationOptions.java
  18. 6
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/DataStorageOptions.java
  19. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/GraphQlOptions.java
  20. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/JsonRpcHttpOptions.java
  21. 2
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/LoggingLevelOption.java
  22. 2
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/NodePrivateKeyFileOption.java
  23. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java
  24. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/PermissionsOptions.java
  25. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/PluginsConfigurationOptions.java
  26. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/RpcWebsocketOptions.java
  27. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/ChainPruningOptions.java
  28. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/DnsOptions.java
  29. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/EvmOptions.java
  30. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/IpcOptions.java
  31. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/NatOptions.java
  32. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/NativeLibraryOptions.java
  33. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/PkiBlockCreationOptions.java
  34. 2
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/PrivacyPluginOptions.java
  35. 3
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/RPCOptions.java
  36. 3
      besu/src/main/java/org/hyperledger/besu/cli/presynctasks/PreSynchronizationTaskRunner.java
  37. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/RetestethSubCommand.java
  38. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/operator/BackupState.java
  39. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/operator/GenerateLogBloomCache.java
  40. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/operator/RestoreState.java
  41. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/rlp/IbftExtraDataCLIAdapter.java
  42. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/rlp/QbftExtraDataCLIAdapter.java
  43. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/storage/RevertMetadataSubCommand.java
  44. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/storage/RocksDbHelper.java
  45. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/storage/RocksDbSubCommand.java
  46. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/storage/TrieLogHelper.java
  47. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/storage/TrieLogSubCommand.java
  48. 2
      besu/src/main/java/org/hyperledger/besu/cli/util/AbstractConfigurationFinder.java
  49. 2
      besu/src/main/java/org/hyperledger/besu/cli/util/CommandLineUtils.java
  50. 3
      besu/src/main/java/org/hyperledger/besu/cli/util/ConfigFileFinder.java
  51. 3
      besu/src/main/java/org/hyperledger/besu/cli/util/ProfileFinder.java
  52. 2
      besu/src/main/java/org/hyperledger/besu/components/BesuCommandModule.java
  53. 3
      besu/src/main/java/org/hyperledger/besu/components/BesuPluginContextModule.java
  54. 2
      besu/src/main/java/org/hyperledger/besu/controller/BesuController.java
  55. 3
      besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java
  56. 3
      besu/src/main/java/org/hyperledger/besu/controller/BftBesuControllerBuilder.java
  57. 3
      besu/src/main/java/org/hyperledger/besu/controller/CliqueBesuControllerBuilder.java
  58. 3
      besu/src/main/java/org/hyperledger/besu/controller/IbftBesuControllerBuilder.java
  59. 3
      besu/src/main/java/org/hyperledger/besu/controller/MainnetBesuControllerBuilder.java
  60. 3
      besu/src/main/java/org/hyperledger/besu/controller/MergeBesuControllerBuilder.java
  61. 2
      besu/src/main/java/org/hyperledger/besu/controller/NoopPluginServiceFactory.java
  62. 3
      besu/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java
  63. 3
      besu/src/main/java/org/hyperledger/besu/services/BesuConfigurationImpl.java
  64. 3
      besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java
  65. 3
      besu/src/main/java/org/hyperledger/besu/services/PermissioningServiceImpl.java
  66. 3
      besu/src/main/java/org/hyperledger/besu/services/PrivacyPluginServiceImpl.java
  67. 3
      besu/src/main/java/org/hyperledger/besu/services/RpcEndpointServiceImpl.java
  68. 3
      besu/src/main/java/org/hyperledger/besu/services/SecurityModuleServiceImpl.java
  69. 3
      besu/src/main/java/org/hyperledger/besu/services/TransactionPoolValidatorServiceImpl.java
  70. 3
      besu/src/main/java/org/hyperledger/besu/services/TransactionSelectionServiceImpl.java
  71. 2
      besu/src/main/java/org/hyperledger/besu/util/PermissioningConfigurationValidator.java
  72. 2
      besu/src/main/java/org/hyperledger/besu/util/StringUtils.java
  73. 2
      besu/src/test/java/org/hyperledger/besu/cli/options/stable/LoggingLevelOptionTest.java
  74. 2
      besu/src/test/java/org/hyperledger/besu/cli/util/ConfigDefaultValueProviderStrategyTest.java

@ -26,6 +26,8 @@ import picocli.CommandLine.RunLast;
/** Besu bootstrap class. */
public final class Besu {
/** Default constructor. */
public Besu() {}
/**
* The main entrypoint to Besu application

@ -194,6 +194,9 @@ public class RunnerBuilder {
private boolean legacyForkIdEnabled;
private Optional<EnodeDnsConfiguration> enodeDnsConfiguration;
/** Instantiates a new Runner builder. */
public RunnerBuilder() {}
/**
* Add Vertx.
*

@ -65,6 +65,9 @@ public class RlpBlockImporter implements Closeable {
private final Stopwatch segmentTimer = Stopwatch.createUnstarted();
private static final long SEGMENT_SIZE = 1000;
/** Default Constructor. */
public RlpBlockImporter() {}
/**
* Imports blocks that are stored as concatenated RLP sections in the given file into Besu's block
* storage.

@ -62,6 +62,8 @@ public class ConfigurationOverviewBuilder {
private BesuPluginContextImpl besuPluginContext;
/**
* Create a new ConfigurationOverviewBuilder.
*
* @param logger the logger
*/
public ConfigurationOverviewBuilder(final Logger logger) {

@ -21,6 +21,7 @@ import java.util.List;
/** The Network deprecation message. */
public class NetworkDeprecationMessage {
private NetworkDeprecationMessage() {}
/**
* Generate deprecation message for specified testnet network.

@ -30,7 +30,14 @@ import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
/** The Eth network config. */
/**
* The Eth network config.
*
* @param genesisConfigFile Genesis Config File
* @param networkId Network Id
* @param bootNodes Boot Nodes
* @param dnsDiscoveryUrl DNS Discovery URL
*/
public record EthNetworkConfig(
GenesisConfigFile genesisConfigFile,
BigInteger networkId,

@ -24,6 +24,9 @@ import picocli.CommandLine;
public class DurationMillisConverter
implements CommandLine.ITypeConverter<Duration>, TypeFormatter<Duration> {
/** Default constructor. */
public DurationMillisConverter() {}
@Override
public Duration convert(final String value) throws DurationConversionException {
try {

@ -22,6 +22,9 @@ import picocli.CommandLine;
/** The Fraction converter to convert floats in CLI. */
public class FractionConverter implements CommandLine.ITypeConverter<Fraction> {
/** Default constructor. */
public FractionConverter() {}
@Override
public Fraction convert(final String value) throws FractionConversionException {
try {

@ -29,6 +29,9 @@ public class MetricCategoryConverter implements CommandLine.ITypeConverter<Metri
private final Map<String, MetricCategory> metricCategories = new HashMap<>();
/** Default Constructor. */
public MetricCategoryConverter() {}
@Override
public MetricCategory convert(final String value) {
final MetricCategory category = metricCategories.get(value);

@ -21,6 +21,8 @@ import picocli.CommandLine;
/** The Percentage Cli type converter. */
public class PercentageConverter implements CommandLine.ITypeConverter<Percentage> {
/** Default Constructor. */
public PercentageConverter() {}
@Override
public Percentage convert(final String value) throws PercentageConversionException {

@ -26,6 +26,8 @@ import picocli.CommandLine;
* intended for use with PicoCLI to process command line arguments that specify plugin information.
*/
public class PluginInfoConverter implements CommandLine.ITypeConverter<List<PluginInfo>> {
/** Default Constructor. */
public PluginInfoConverter() {}
/**
* Converts a comma-separated string into a list of {@link PluginInfo}.

@ -21,6 +21,8 @@ import picocli.CommandLine;
/** The PositiveNumber Cli type converter. */
public class PositiveNumberConverter implements CommandLine.ITypeConverter<PositiveNumber> {
/** Default Constructor. */
public PositiveNumberConverter() {}
@Override
public PositiveNumber convert(final String value) throws PercentageConversionException {

@ -29,6 +29,8 @@ import picocli.CommandLine.ParameterException;
/** The Rpc authentication file validator. */
public class RpcAuthFileValidator {
/** Default Constructor. */
RpcAuthFileValidator() {}
/**
* Validate auth file.

@ -20,6 +20,10 @@ import picocli.CommandLine.Model.CommandSpec;
/** Custom Execution Exception Handler used by PicoCLI framework. */
public class BesuExecutionExceptionHandler implements IExecutionExceptionHandler {
/** Default constructor. */
public BesuExecutionExceptionHandler() {}
@Override
public int handleExecutionException(
final Exception ex,

@ -21,6 +21,8 @@ import org.apache.logging.log4j.core.config.ConfigurationSource;
/** Custom Log4J Configuration Factory for Besu */
public class BesuLoggingConfigurationFactory extends ConfigurationFactory {
/** Default constructor. */
public BesuLoggingConfigurationFactory() {}
@Override
protected String[] getSupportedTypes() {

@ -29,6 +29,8 @@ import org.apache.tuweni.units.bigints.UInt256;
/** The Option parser. */
public class OptionParser {
/** Default Constructor. */
OptionParser() {}
/**
* Parse long range range.

@ -29,6 +29,8 @@ import picocli.CommandLine;
* and trace filter range.
*/
public class ApiConfigurationOptions {
/** Default constructor. */
public ApiConfigurationOptions() {}
@CommandLine.Option(
names = {"--api-gas-price-blocks"},

@ -71,6 +71,9 @@ public class DataStorageOptions implements CLIOptions<DataStorageConfiguration>
@CommandLine.ArgGroup(validate = false)
private final DataStorageOptions.Unstable unstableOptions = new Unstable();
/** Default Constructor. */
DataStorageOptions() {}
/** The unstable options for data storage. */
public static class Unstable {
private static final String BONSAI_LIMIT_TRIE_LOGS_ENABLED =
@ -113,6 +116,9 @@ public class DataStorageOptions implements CLIOptions<DataStorageConfiguration>
description =
"Enables code storage using code hash instead of by account hash. (default: ${DEFAULT-VALUE})")
private boolean bonsaiCodeUsingCodeHashEnabled = DEFAULT_BONSAI_CODE_USING_CODE_HASH_ENABLED;
/** Default Constructor. */
Unstable() {}
}
/**

@ -56,6 +56,9 @@ public class GraphQlOptions {
private final CorsAllowedOriginsProperty graphQLHttpCorsAllowedOrigins =
new CorsAllowedOriginsProperty();
/** Default constructor */
public GraphQlOptions() {}
/**
* Validates the GraphQL HTTP options.
*

@ -208,6 +208,9 @@ public class JsonRpcHttpOptions {
description = "Enable JSON pretty print format (default: ${DEFAULT-VALUE})")
private final Boolean prettyJsonEnabled = DEFAULT_PRETTY_JSON_ENABLED;
/** Default constructor */
public JsonRpcHttpOptions() {}
/**
* Validates the Rpc Http options.
*

@ -23,6 +23,8 @@ import picocli.CommandLine.Spec;
/** The Logging level CLI option. */
public class LoggingLevelOption {
/** Default Constructor. */
LoggingLevelOption() {}
/**
* Create logging level option.

@ -22,6 +22,8 @@ import picocli.CommandLine;
/** The Node private key file Cli option. */
public class NodePrivateKeyFileOption {
/** Default constructor. */
NodePrivateKeyFileOption() {}
/**
* Create node private key file option.

@ -103,6 +103,9 @@ public class P2PTLSConfigOptions {
"Whether to send a SNI header in the TLS ClientHello message (default: ${DEFAULT-VALUE})")
private final Boolean p2pTlsClientHelloSniHeaderEnabled = false;
/** Default constructor. */
P2PTLSConfigOptions() {}
/**
* Generate P2p tls configuration.
*

@ -83,6 +83,9 @@ public class PermissionsOptions {
"Enable account level permissions via smart contract (default: ${DEFAULT-VALUE})")
private final Boolean permissionsAccountsContractEnabled = false;
/** Default constructor. */
public PermissionsOptions() {}
/**
* Creates a PermissioningConfiguration based on the provided options.
*

@ -37,6 +37,9 @@ public class PluginsConfigurationOptions implements CLIOptions<PluginConfigurati
arity = "1..*")
private List<PluginInfo> plugins;
/** Default Constructor. */
public PluginsConfigurationOptions() {}
@Override
public PluginConfiguration toDomainObject() {
return new PluginConfiguration(plugins);

@ -120,6 +120,9 @@ public class RpcWebsocketOptions {
arity = "1")
private final File rpcWsAuthenticationPublicKeyFile = null;
/** Default Constructor. */
public RpcWebsocketOptions() {}
/**
* Validates the WebSocket options.
*

@ -61,6 +61,9 @@ public class ChainPruningOptions implements CLIOptions<ChainPrunerConfiguration>
private final PositiveNumber chainDataPruningBlocksFrequency =
PositiveNumber.fromInt(DEFAULT_CHAIN_DATA_PRUNING_FREQUENCY);
/** Default Constructor. */
ChainPruningOptions() {}
/**
* Create chain pruning options.
*

@ -43,6 +43,9 @@ public class DnsOptions implements CLIOptions<EnodeDnsConfiguration> {
arity = "1")
private Boolean dnsUpdateEnabled = Boolean.FALSE;
/** Instantiates a new Dns options. */
DnsOptions() {}
/**
* Create dns options.
*

@ -30,6 +30,9 @@ public class EvmOptions implements CLIOptions<EvmConfiguration> {
/** The constant WORLDSTATE_UPDATE_MODE. */
public static final String WORLDSTATE_UPDATE_MODE = "--Xevm-worldstate-update-mode";
/** Default constructor. */
EvmOptions() {}
/**
* Create evm options.
*

@ -25,6 +25,9 @@ import picocli.CommandLine;
public class IpcOptions {
private static final String DEFAULT_IPC_FILE = "besu.ipc";
/** Default constructor. */
IpcOptions() {}
/**
* Create ipc options.
*

@ -37,6 +37,9 @@ public class NatOptions {
arity = "1")
private final Boolean natMethodFallbackEnabled = true;
/** Default constructor. */
NatOptions() {}
/**
* Create nat options.
*

@ -55,6 +55,9 @@ public class NativeLibraryOptions {
arity = "1")
private final Boolean nativeModExp = Boolean.TRUE;
/** Default constructor. */
NativeLibraryOptions() {}
/**
* Create native library options.
*

@ -107,6 +107,9 @@ public class PkiBlockCreationOptions {
description = "File with all CRLs for PKI Block Creation.")
Path crlFile = null;
/** Default Constructor. */
PkiBlockCreationOptions() {}
/**
* As domain config optional.
*

@ -18,6 +18,8 @@ import static picocli.CommandLine.Option;
/** The Privacy plugin Cli options. */
public class PrivacyPluginOptions {
/** Default Constructor. */
PrivacyPluginOptions() {}
/**
* Create privacy plugin options.

@ -35,6 +35,9 @@ public class RPCOptions {
arity = "1")
private final Long wsTimeoutSec = TimeoutOptions.defaultOptions().getTimeoutSeconds();
/** Default Constructor. */
RPCOptions() {}
/**
* Create rpc options.
*

@ -24,6 +24,9 @@ public class PreSynchronizationTaskRunner {
private final List<PreSynchronizationTask> tasks = new ArrayList<>();
/** Default Constructor. */
public PreSynchronizationTaskRunner() {}
/**
* Add task.
*

@ -89,6 +89,9 @@ public class RetestethSubCommand implements Runnable {
private InetAddress autoDiscoveredDefaultIP;
/** Default Constructor. */
public RetestethSubCommand() {}
// Used to discover the default IP of the client.
// Loopback IP is used by default as this is how smokeTests require it to be
// and it's probably a good security behaviour to default only on the localhost.

@ -45,6 +45,9 @@ import picocli.CommandLine.ParentCommand;
versionProvider = VersionProvider.class)
public class BackupState implements Runnable {
/** Default constructor. */
public BackupState() {}
@Option(
names = "--block",
paramLabel = MANDATORY_LONG_FORMAT_HELP,

@ -59,6 +59,9 @@ public class GenerateLogBloomCache implements Runnable {
@ParentCommand private OperatorSubCommand parentCommand;
/** Default constructor. */
public GenerateLogBloomCache() {}
@SuppressWarnings("ResultOfMethodCallIgnored")
@Override
public void run() {

@ -83,6 +83,9 @@ public class RestoreState implements Runnable {
private BesuController besuController;
private ForestWorldStateKeyValueStorage.Updater updater;
/** Default Constructor. */
RestoreState() {}
private Path accountFileName(final int fileNumber, final boolean compressed) {
return StateBackupService.accountFileName(backupDir, targetBlock, fileNumber, compressed);
}

@ -34,6 +34,9 @@ public class IbftExtraDataCLIAdapter implements JSONToRLP {
private static final ObjectMapper MAPPER = new ObjectMapper();
private static final TypeReference<Collection<String>> TYPE_REF = new TypeReference<>() {};
/** Default constructor. */
public IbftExtraDataCLIAdapter() {}
@Override
public Bytes encode(final String json) throws IOException {
return fromJsonAddresses(json);

@ -31,6 +31,9 @@ public class QbftExtraDataCLIAdapter implements JSONToRLP {
private static final ObjectMapper MAPPER = new ObjectMapper();
private static final TypeReference<Collection<String>> TYPE_REF = new TypeReference<>() {};
/** Default Constructor. */
public QbftExtraDataCLIAdapter() {}
@Override
public Bytes encode(final String json) throws IOException {
return fromJsonAddresses(json);

@ -57,6 +57,9 @@ public class RevertMetadataSubCommand implements Runnable {
@CommandLine.Spec
private CommandLine.Model.CommandSpec spec;
/** Default Constructor. */
public RevertMetadataSubCommand() {}
@Override
public void run() {
spec.commandLine().usage(System.out);

@ -35,6 +35,9 @@ import org.slf4j.LoggerFactory;
public class RocksDbHelper {
private static final Logger LOG = LoggerFactory.getLogger(RocksDbHelper.class);
/** Default Constructor. */
RocksDbHelper() {}
static void forEachColumnFamily(
final String dbPath, final BiConsumer<RocksDB, ColumnFamilyHandle> task) {
RocksDB.loadLibrary();

@ -44,6 +44,9 @@ public class RocksDbSubCommand implements Runnable {
@CommandLine.Spec
private CommandLine.Model.CommandSpec spec;
/** Default Constructor. */
public RocksDbSubCommand() {}
@Override
public void run() {
spec.commandLine().usage(System.out);

@ -59,6 +59,9 @@ public class TrieLogHelper {
private static final int ROCKSDB_MAX_INSERTS_PER_TRANSACTION = 1000;
private static final Logger LOG = LoggerFactory.getLogger(TrieLogHelper.class);
/** Default Constructor. */
public TrieLogHelper() {}
boolean prune(
final DataStorageConfiguration config,
final BonsaiWorldStateKeyValueStorage rootWorldStateStorage,

@ -71,6 +71,9 @@ public class TrieLogSubCommand implements Runnable {
@CommandLine.Spec
private CommandLine.Model.CommandSpec spec; // Picocli injects reference to command spec
/** Default Constructor. */
TrieLogSubCommand() {}
@Override
public void run() {
final PrintWriter out = spec.commandLine().getOut();

@ -27,6 +27,8 @@ import picocli.CommandLine;
* @param <T> the type of configuration resource this finder will return
*/
public abstract class AbstractConfigurationFinder<T> {
/** Default Constructor. */
public AbstractConfigurationFinder() {}
/**
* Returns the name of the configuration option.

@ -48,6 +48,8 @@ public class CommandLineUtils {
public static final String DEPRECATED_AND_USELESS_WARNING_MSG =
"{} has been deprecated and is now useless, remove it.";
private CommandLineUtils() {}
/**
* Check if options are passed that require an option to be true to have any effect and log a
* warning with the list of affected options.

@ -30,6 +30,9 @@ import picocli.CommandLine;
public class ConfigFileFinder extends AbstractConfigurationFinder<File> {
private static final String CONFIG_FILE_ENV_NAME = "BESU_CONFIG_FILE";
/** Default constructor. */
public ConfigFileFinder() {}
/**
* Returns the name of the configuration option.
*

@ -34,6 +34,9 @@ import picocli.CommandLine;
public class ProfileFinder extends AbstractConfigurationFinder<InputStream> {
private static final String PROFILE_ENV_NAME = "BESU_PROFILE";
/** Default Constructor. */
public ProfileFinder() {}
@Override
protected String getConfigOptionName() {
return PROFILE_OPTION_NAME;

@ -37,6 +37,8 @@ import org.slf4j.Logger;
*/
@Module
public class BesuCommandModule {
/** Default constructor. */
public BesuCommandModule() {}
@Provides
@Singleton

@ -26,6 +26,9 @@ import dagger.Provides;
@Module
public class BesuPluginContextModule {
/** Default constructor. */
public BesuPluginContextModule() {}
/**
* Creates a BesuPluginContextImpl, used for plugin service discovery.
*

@ -311,6 +311,8 @@ public class BesuController implements java.io.Closeable {
/** The type Builder. */
public static class Builder {
/** Instantiates a new Builder. */
public Builder() {}
/**
* From eth network config besu controller builder.

@ -205,6 +205,9 @@ public abstract class BesuControllerBuilder implements MiningParameterOverrides
private int numberOfBlocksToCache = 0;
/** Instantiates a new Besu controller builder. */
protected BesuControllerBuilder() {}
/**
* Provide a BesuComponent which can be used to get other dependencies
*

@ -24,6 +24,9 @@ import com.google.common.base.Suppliers;
/** Base class for BFT based Besu Controller Builders. */
public abstract class BftBesuControllerBuilder extends BesuControllerBuilder {
/** Default constructor to be used by subclasses. */
protected BftBesuControllerBuilder() {}
/**
* Bft extra data codec supplier.
*

@ -57,6 +57,9 @@ public class CliqueBesuControllerBuilder extends BesuControllerBuilder {
private final BlockInterface blockInterface = new CliqueBlockInterface();
private ForksSchedule<CliqueConfigOptions> forksSchedule;
/** Default constructor. */
public CliqueBesuControllerBuilder() {}
@Override
protected void prepForBuild() {
localAddress = Util.publicKeyToAddress(nodeKey.getPublicKey());

@ -94,6 +94,9 @@ public class IbftBesuControllerBuilder extends BftBesuControllerBuilder {
private ForksSchedule<BftConfigOptions> forksSchedule;
private ValidatorPeers peers;
/** Default Constructor */
public IbftBesuControllerBuilder() {}
@Override
protected Supplier<BftExtraDataCodec> bftExtraDataCodec() {
return Suppliers.memoize(IbftExtraDataCodec::new);

@ -36,6 +36,9 @@ public class MainnetBesuControllerBuilder extends BesuControllerBuilder {
private EpochCalculator epochCalculator = new EpochCalculator.DefaultEpochCalculator();
/** Default constructor. */
public MainnetBesuControllerBuilder() {}
@Override
protected MiningCoordinator createMiningCoordinator(
final ProtocolSchedule protocolSchedule,

@ -58,6 +58,9 @@ public class MergeBesuControllerBuilder extends BesuControllerBuilder {
private final AtomicReference<SyncState> syncState = new AtomicReference<>();
private static final Logger LOG = LoggerFactory.getLogger(MergeBesuControllerBuilder.class);
/** Default constructor. */
public MergeBesuControllerBuilder() {}
@Override
protected MiningCoordinator createMiningCoordinator(
final ProtocolSchedule protocolSchedule,

@ -18,6 +18,8 @@ import org.hyperledger.besu.services.BesuPluginContextImpl;
/** The Noop plugin service factory. */
public class NoopPluginServiceFactory implements PluginServiceFactory {
/** Default Constructor. */
public NoopPluginServiceFactory() {}
@Override
public void appendPluginServices(final BesuPluginContextImpl besuContext) {}

@ -106,6 +106,9 @@ public class QbftBesuControllerBuilder extends BftBesuControllerBuilder {
private ValidatorPeers peers;
private TransactionValidatorProvider transactionValidatorProvider;
/** Default Constructor. */
public QbftBesuControllerBuilder() {}
@Override
protected Supplier<BftExtraDataCodec> bftExtraDataCodec() {
return Suppliers.memoize(

@ -29,6 +29,9 @@ public class BesuConfigurationImpl implements BesuConfiguration {
private DataStorageConfiguration dataStorageConfiguration;
private MiningParameters miningParameters;
/** Default Constructor. */
public BesuConfigurationImpl() {}
/**
* Post creation initialization
*

@ -84,6 +84,9 @@ public class BesuPluginContextImpl implements BesuContext, PluginVersionsProvide
private final List<String> pluginVersions = new ArrayList<>();
/** Instantiates a new Besu plugin context. */
public BesuPluginContextImpl() {}
/**
* Add service.
*

@ -28,6 +28,9 @@ public class PermissioningServiceImpl implements PermissioningService {
private final List<NodeConnectionPermissioningProvider> connectionPermissioningProviders =
Lists.newArrayList();
/** Default Constructor. */
public PermissioningServiceImpl() {}
@Override
public void registerNodePermissioningProvider(
final NodeConnectionPermissioningProvider provider) {

@ -34,6 +34,9 @@ public class PrivacyPluginServiceImpl implements PrivacyPluginService {
(privacyGroupId, privacyUserId, blockNumber) -> true;
private PrivacyGroupGenesisProvider privacyGroupGenesisProvider;
/** Default Constructor. */
public PrivacyPluginServiceImpl() {}
@Override
public void setPayloadProvider(final PrivacyPluginPayloadProvider privacyPluginPayloadProvider) {
this.privacyPluginPayloadProvider = privacyPluginPayloadProvider;

@ -33,6 +33,9 @@ import java.util.stream.Collectors;
public class RpcEndpointServiceImpl implements RpcEndpointService {
private final Map<String, Function<PluginRpcRequest, ?>> rpcMethods = new HashMap<>();
/** Default Constructor. */
public RpcEndpointServiceImpl() {}
@Override
public <T> void registerRPCEndpoint(
final String namespace,

@ -27,6 +27,9 @@ public class SecurityModuleServiceImpl implements SecurityModuleService {
private final Map<String, Supplier<SecurityModule>> securityModuleSuppliers =
new ConcurrentHashMap<>();
/** Default Constructor. */
public SecurityModuleServiceImpl() {}
@Override
public void register(final String name, final Supplier<SecurityModule> securityModuleSupplier) {
securityModuleSuppliers.put(name, securityModuleSupplier);

@ -25,6 +25,9 @@ public class TransactionPoolValidatorServiceImpl implements TransactionPoolValid
private Optional<PluginTransactionPoolValidatorFactory> factory = Optional.empty();
/** Default Constructor. */
public TransactionPoolValidatorServiceImpl() {}
@Override
public PluginTransactionPoolValidator createTransactionValidator() {
return factory

@ -25,6 +25,9 @@ public class TransactionSelectionServiceImpl implements TransactionSelectionServ
private Optional<PluginTransactionSelectorFactory> factory = Optional.empty();
/** Default Constructor. */
public TransactionSelectionServiceImpl() {}
@Override
public PluginTransactionSelector createPluginTransactionSelector() {
return factory

@ -26,6 +26,8 @@ import java.util.stream.Collectors;
/** The Permissioning configuration validator. */
public class PermissioningConfigurationValidator {
/** Default Constructor. */
PermissioningConfigurationValidator() {}
/**
* Check if all nodes are in allowlist.

@ -19,6 +19,8 @@ import java.util.function.Function;
/** some useful tools to display strings in command line help or error messages */
public class StringUtils {
/** Default Constructor. */
StringUtils() {}
/**
* Joins a list into string elements with a delimiter but having a last different delimiter

@ -33,7 +33,7 @@ public class LoggingLevelOptionTest {
@BeforeEach
public void setUp() {
levelOption = new LoggingLevelOption();
levelOption = LoggingLevelOption.create();
}
@Test

@ -82,7 +82,7 @@ public class ConfigDefaultValueProviderStrategyTest {
.thenReturn(mockConfigOptionSpec);
lenient().when(mockParseResult.hasMatchedOption(CONFIG_FILE_OPTION_NAME)).thenReturn(true);
lenient().when(mockConfigOptionSpec.getter()).thenReturn(mockConfigOptionGetter);
levelOption = new LoggingLevelOption();
levelOption = LoggingLevelOption.create();
levelOption.setLogLevel("INFO");
configParsingHandler = new ConfigDefaultValueProviderStrategy(resultHandler, environment);
}

Loading…
Cancel
Save