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

Move config stuff to own Config class, cleanup readme about logging c… #15

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

StrongestNumber9
Copy link
Contributor

…onfigs

keystorePassword = System.getProperty("tlsKeystorePassword", "changeit");
}

public InputStream getKeystoreStream() throws IOException {
Copy link
Member

Choose a reason for hiding this comment

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

this is poperational code and should not be part of the config as config should not contain executable code.

}
public Config() {
try {
port = Integer.parseInt(System.getProperty("port", "1601"));
Copy link

Choose a reason for hiding this comment

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

16% of developers fix this issue

StaticAssignmentInConstructor: This assignment is to a static field. Mutating static state from a constructor is highly error-prone.

❗❗ 2 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
src/main/java/com/teragrep/rlp_07/Config.java 33
src/main/java/com/teragrep/rlp_07/Config.java 34

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

}
isTls = Boolean.parseBoolean(System.getProperty("tls", "false"));
keystorePassword = System.getProperty("tlsKeystorePassword", "changeit");
keystorePath = System.getProperty("tlsKeystore", null);
Copy link

Choose a reason for hiding this comment

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

16% of developers fix this issue

StaticAssignmentInConstructor: This assignment is to a static field. Mutating static state from a constructor is highly error-prone.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

LOGGER.info("Starting TLS server on port " + config.getPort());

String keystorePath = config.getKeystorePath();
InputStream keystoreStream;
if(keystorePath != null) {
LOGGER.info("Using user supplied keystore");
Path path = Paths.get(keystorePath);
Copy link

Choose a reason for hiding this comment

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

9% of developers fix this issue

PATH_TRAVERSAL_IN: This API (java/nio/file/Paths.get(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;) reads a file whose location might be specified by user input


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

Copy link
Member

@kortemik kortemik left a comment

Choose a reason for hiding this comment

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

essu o

@StrongestNumber9 StrongestNumber9 merged commit 2ab47fc into teragrep:main Jun 13, 2023
@StrongestNumber9 StrongestNumber9 deleted the config branch June 13, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants