File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -116,9 +116,8 @@ public class GettingStarted {
116
116
public static void main (String [] args ) {
117
117
System . out. println(" Harness SDK Getting Started" );
118
118
119
- try {
120
- // Create a Feature Flag Client
121
- CfClient cfClient = new CfClient (apiKey);
119
+ // Create a Feature Flag Client
120
+ try (CfClient cfClient = new CfClient (apiKey)) {
122
121
cfClient. waitForInitialization();
123
122
124
123
// Create a target (different targets can get different results based on rules. This includes a custom attribute 'location')
@@ -140,9 +139,6 @@ public class GettingStarted {
140
139
141
140
} catch (Exception e) {
142
141
e. printStackTrace();
143
- } finally {
144
- // Close the SDK
145
- CfClient . getInstance(). close();
146
142
}
147
143
}
148
144
You can’t perform that action at this time.
0 commit comments