Skip to content

Commit a470777

Browse files
Apply suggestions from code review
Co-authored-by: Matthew M. Keeler <[email protected]>
1 parent 6034f68 commit a470777

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Repository Maintainers
2-
* @launchdarkly/team-sdk
2+
* @launchdarkly/team-sdk-java

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Below, you'll find the basic build procedure, but for more comprehensive instruc
88

99
This project uses [Gradle](https://gradle.org/). It requires that Java is already installed on your system (version 8 or higher). It will automatically use the latest release of the LaunchDarkly SDK with major version 7.
1010

11-
1. Set the value of environment variable `LD_SDK_KEY` to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, edit `src/main/java/Hello.java` and set `FEATURE_FLAG_KEY` in code to the flag key.
11+
1. Set the value of environment variable `LAUNCHDARKLY_SERVER_KEY` to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, edit `src/main/java/Hello.java` and set `FEATURE_FLAG_KEY` in code to the flag key.
1212

1313
```sh
14-
export LD_SDK_KEY=1234567890abcdef
14+
export LAUNCHDARKLY_SERVER_KEY=1234567890abcdef
1515
```
1616

1717
```java

src/main/java/Hello.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,9 @@ private static void printLogo() {
3131
public static void main(String... args) throws Exception {
3232
// Set this environment variable to skip the loop process and evaluate the flag
3333
// a single time.
34-
boolean CIMode = false;
35-
String ci = System.getenv("CI");
36-
if(ci != null) {
37-
CIMode = true;
38-
}
34+
boolean CIMode = System.getenv("CI") != null;
3935

40-
// Get SDK Key from env variable LD_SDK_KEY
36+
// Get SDK Key from env variable LAUNCHDARKLY_SERVER_KEY
4137
String envSDKKey = System.getenv("LAUNCHDARKLY_SERVER_KEY");
4238
if(envSDKKey != null) {
4339
SDK_KEY = envSDKKey;
@@ -51,7 +47,7 @@ public static void main(String... args) throws Exception {
5147
LDConfig config = new LDConfig.Builder().build();
5248

5349
if (SDK_KEY == null || SDK_KEY.equals("")) {
54-
showMessage("Please set the LD_SDK_KEY environment variable or edit Hello.java to set SDK_KEY to your LaunchDarkly SDK key first.");
50+
showMessage("Please set the LAUNCHDARKLY_SERVER_KEY environment variable or edit Hello.java to set SDK_KEY to your LaunchDarkly SDK key first.");
5551
System.exit(1);
5652
}
5753

0 commit comments

Comments
 (0)