File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
client/src/main/java/dev/restate/client/base Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,13 @@ public abstract class BaseClient implements Client {
4343 private final ClientRequestOptions baseOptions ;
4444
4545 protected BaseClient (URI baseUri , SerdeFactory serdeFactory , ClientRequestOptions baseOptions ) {
46- this .baseUri = baseUri ;
47- this .serdeFactory = serdeFactory ;
48- this .baseOptions = baseOptions ;
46+ this .baseUri = Objects .requireNonNull (baseUri , "Base uri cannot be null" );
47+ if (!this .baseUri .isAbsolute ()) {
48+ throw new IllegalArgumentException (
49+ "The base uri " + baseUri + " is not absolute. This is not supported." );
50+ }
51+ this .serdeFactory = serdeFactory == null ? SerdeFactory .NOOP : serdeFactory ;
52+ this .baseOptions = baseOptions == null ? ClientRequestOptions .DEFAULT : baseOptions ;
4953 }
5054
5155 @ Override
You can’t perform that action at this time.
0 commit comments