Skip to content
Prev Previous commit
Next Next commit
check null client version
  • Loading branch information
jaeopt committed Mar 14, 2022
commit a854b08b9e228962b98b5f25c3ef11b8ad668f2d
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ public final class BuildVersionInfo {
private static String clientVersion = readVersionNumber();
Copy link
Contributor

Choose a reason for hiding this comment

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

final?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unlike the old VERSION, this private variable can be changed with Optimizely.Builder.


public static void setClientVersion(String version) {
clientVersion = version;
if (version == null || version.isEmpty()) {
logger.warn("ClientVersion cannot be empty, defaulting to the core java-sdk version.");
return;
}
clientVersion = version;
}

public static String getClientVersion() {
Expand Down