Skip to content

Commit f4e4a5f

Browse files
author
Chris Wilson
committed
Merging in PR #76 - Testing parameter instead of field results in NPE.
1 parent 68d223e commit f4e4a5f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libs/sparkpost-lib/src/main/java/com/sparkpost/transport/RestConnection.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import com.sparkpost.model.responses.ServerErrorResponses;
2727
import com.sparkpost.resources.Endpoint;
2828

29+
import lombok.Getter;
30+
2931
/**
3032
* The REST connection class wraps HTTP requests to the SparkPost API.
3133
*/
@@ -43,6 +45,7 @@ public class RestConnection implements IRestConnection {
4345

4446
private final Client client;
4547

48+
@Getter
4649
private final String baseUrl;
4750

4851
/**
@@ -90,8 +93,8 @@ public RestConnection(Client client, String baseUrl) throws SparkPostException {
9093
this.baseUrl = baseUrl;
9194
}
9295

93-
if (baseUrl.endsWith("/")) {
94-
throw new IllegalStateException("SPARKPOST_BASE_URL should not end with a '/', SPARKPOST_BASE_URL=" + baseUrl + "");
96+
if (this.baseUrl.endsWith("/")) {
97+
throw new IllegalStateException("SPARKPOST_BASE_URL should not end with a '/', SPARKPOST_BASE_URL=" + this.baseUrl + "");
9598
}
9699
}
97100

0 commit comments

Comments
 (0)