Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for potential null arguments for the command and debug command params #1175

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

radovanradic
Copy link
Contributor

@radovanradic radovanradic commented Aug 5, 2024

No description provided.

@radovanradic radovanradic changed the title Check for potential null arguments for the command and debug command … Check for potential null arguments for the command and debug command params Aug 5, 2024
cli.add(processParameters.getMainClass());
cli.addAll(processParameters.getArguments());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think any other parameter besides javaBin and mainClass can be null because all others are added as cli.addAll() and it would fail if param is null. Added debug logging command params, maybe if something slipped as null could be noticed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not looking useful, looks like logging is always disabled in SystemStreamLog that is actual logger implementation:

public boolean isDebugEnabled() {
        // TODO Not sure how best to set these for this implementation...
        return false;
    }

    /**
     * @see org.apache.maven.plugin.logging.Log#isInfoEnabled()
     */
    public boolean isInfoEnabled() {
        return true;
    }

    /**
     * @see org.apache.maven.plugin.logging.Log#isWarnEnabled()
     */
    public boolean isWarnEnabled() {
        return true;
    }

    /**
     * @see org.apache.maven.plugin.logging.Log#isErrorEnabled()
     */
    public boolean isErrorEnabled() {
        return true;
    }

@radovanradic radovanradic added type: enhancement New feature or request type: improvement A minor improvement to an existing feature and removed type: enhancement New feature or request labels Aug 5, 2024
Copy link

sonarqubecloud bot commented Aug 5, 2024

@radovanradic radovanradic added this pull request to the merge queue Aug 5, 2024
Merged via the queue into 4.6.x with commit e5853df Aug 5, 2024
6 checks passed
@radovanradic radovanradic deleted the debug-process-args branch August 5, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants