Skip to content

refactor: make loadFromProperties private #2287

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

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ public class Utils {
* via the {@code git-commit-id-plugin} maven plugin.
*
* @return a {@link Version} object encapsulating the version information
* @deprecated use {@link #VERSION} instead, as this method will be made internal in a future
* release
*/
@Deprecated
public static Version loadFromProperties() {
private static Version loadFromProperties() {
final var is =
Thread.currentThread().getContextClassLoader().getResourceAsStream("version.properties");

Expand Down Expand Up @@ -79,9 +76,8 @@ public static int ensureValid(int value, String description, int minValue, int d
throw new IllegalArgumentException(
"Default value for " + description + " must be greater than " + minValue);
}
log.warn("Requested " + description + " should be greater than " + minValue + ". Requested: "
+ value + ", using " + defaultValue + (defaultValue == minValue ? "" : " (default)") +
" instead");
log.warn("Requested {} should be greater than {}. Requested: {}, using {}{} instead",
description, minValue, value, defaultValue, defaultValue == minValue ? "" : " (default)");
value = defaultValue;
}
return value;
Expand Down
Loading