We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e6b374 commit a43b758Copy full SHA for a43b758
yoti-sdk-api/src/main/java/com/yoti/api/client/spi/remote/call/YotiHttpRequestBuilder.java
@@ -107,7 +107,13 @@ public YotiHttpRequestBuilder forSignedRequest(KeyPair keyPair) {
107
* @return the updated builder
108
*/
109
public YotiHttpRequestBuilder withBaseUrl(String baseUrl) {
110
- this.baseUrl = baseUrl.replaceAll("([/]+)$", "");
+ int index;
111
+ for (index = baseUrl.length() - 1; index >= 0; index--) {
112
+ if (baseUrl.charAt(index) != '/') {
113
+ break;
114
+ }
115
116
+ this.baseUrl = baseUrl.substring(0, index + 1);
117
return this;
118
}
119
0 commit comments