Skip to content

Commit 39425bb

Browse files
committed
refactor: make loadFromProperties private (#2287)
Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
1 parent 8b4c691 commit 39425bb

File tree

1 file changed

+3
-7
lines changed
  • operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config

1 file changed

+3
-7
lines changed

Diff for: operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/Utils.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@ public class Utils {
3333
* via the {@code git-commit-id-plugin} maven plugin.
3434
*
3535
* @return a {@link Version} object encapsulating the version information
36-
* @deprecated use {@link #VERSION} instead, as this method will be made internal in a future
37-
* release
3836
*/
39-
@Deprecated
40-
public static Version loadFromProperties() {
37+
private static Version loadFromProperties() {
4138
final var is =
4239
Thread.currentThread().getContextClassLoader().getResourceAsStream("version.properties");
4340

@@ -79,9 +76,8 @@ public static int ensureValid(int value, String description, int minValue, int d
7976
throw new IllegalArgumentException(
8077
"Default value for " + description + " must be greater than " + minValue);
8178
}
82-
log.warn("Requested " + description + " should be greater than " + minValue + ". Requested: "
83-
+ value + ", using " + defaultValue + (defaultValue == minValue ? "" : " (default)") +
84-
" instead");
79+
log.warn("Requested {} should be greater than {}. Requested: {}, using {}{} instead",
80+
description, minValue, value, defaultValue, defaultValue == minValue ? "" : " (default)");
8581
value = defaultValue;
8682
}
8783
return value;

0 commit comments

Comments
 (0)