Skip to content

Commit 845c30e

Browse files
committed
Extract defaults to vars
Signed-off-by: Todd Baert <[email protected]>
1 parent d1ba7df commit 845c30e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdProvider.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import io.grpc.ManagedChannelBuilder;
3030
import lombok.extern.slf4j.Slf4j;
3131

32+
3233
/**
3334
* OpenFeature provider for flagd.
3435
*/
@@ -37,7 +38,9 @@ public class FlagdProvider implements FeatureProvider {
3738

3839
private ServiceBlockingStub serviceStub;
3940
static final String PROVIDER_NAME = "flagD Provider";
40-
41+
static final int DEFAULT_PORT = 8013;
42+
static final String DEFAULT_HOST = "localhost";
43+
4144
/**
4245
* Create a new FlagdProvider instance.
4346
*
@@ -60,7 +63,7 @@ public FlagdProvider(Protocol protocol, String host, int port) {
6063
* Create a new FlagdProvider instance.
6164
*/
6265
public FlagdProvider() {
63-
this(Protocol.HTTP, "localhost", 8013);
66+
this(Protocol.HTTP, DEFAULT_HOST, DEFAULT_PORT);
6467
}
6568

6669
/**

0 commit comments

Comments
 (0)