[style] protected context for constructor of abstract classes

Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
Emmanuel Bigeon 2021-11-07 11:57:13 +01:00
parent 8643b69054
commit 7b7d0e6747
3 changed files with 6 additions and 5 deletions

View File

@ -73,7 +73,7 @@ public abstract class Command implements ICommand {
/** Create the command. /** Create the command.
* *
* @param name the command name */ * @param name the command name */
public Command(final String name) { protected Command(final String name) {
super(); super();
if (name == null) { if (name == null) {
throw new IllegalArgumentException("The command name is mandatory"); throw new IllegalArgumentException("The command name is mandatory");

View File

@ -94,7 +94,7 @@ public abstract class ParametrizedCommand extends Command {
* parameters. * parameters.
* *
* @param name the name */ * @param name the name */
public ParametrizedCommand(final String name) { protected ParametrizedCommand(final String name) {
this(name, true); this(name, true);
} }
@ -106,7 +106,7 @@ public abstract class ParametrizedCommand extends Command {
* *
* @param name the name * @param name the name
* @param strict if the arguments are restricted to the declared ones */ * @param strict if the arguments are restricted to the declared ones */
public ParametrizedCommand(final String name, final boolean strict) { protected ParametrizedCommand(final String name, final boolean strict) {
super(name); super(name);
data = new ParametrizedCommandData(strict); data = new ParametrizedCommandData(strict);
} }

View File

@ -97,7 +97,7 @@ public abstract class AOutputForwardRunnable implements Runnable {
/** Create a forwarding runnable. /** Create a forwarding runnable.
* *
* @param manager the manager */ * @param manager the manager */
public AOutputForwardRunnable(final PipedConsoleOutput manager) { protected AOutputForwardRunnable(final PipedConsoleOutput manager) {
super(); super();
this.manager = manager; this.manager = manager;
timeout = DEFAULT_TIMEOUT; timeout = DEFAULT_TIMEOUT;
@ -116,7 +116,8 @@ public abstract class AOutputForwardRunnable implements Runnable {
* *
* @param manager the manager * @param manager the manager
* @param timeout the timeout between message requests. */ * @param timeout the timeout between message requests. */
public AOutputForwardRunnable(final PipedConsoleOutput manager, final long timeout) { protected AOutputForwardRunnable(final PipedConsoleOutput manager,
final long timeout) {
super(); super();
this.manager = manager; this.manager = manager;
this.timeout = timeout; this.timeout = timeout;