dulvac commented on a change in pull request #27:
URL:
https://github.com/apache/sling-org-apache-sling-testing-clients/pull/27#discussion_r800767667
##########
File path: src/main/java/org/apache/sling/testing/clients/SlingClientConfig.java
##########
@@ -171,8 +170,8 @@ public Builder setUrl(String url) throws URISyntaxException
{
public Builder setUrl(URI url) {
this.url = url;
// Add / as path if none is present
- if (Strings.isNullOrEmpty(this.url.getPath()) ||
!this.url.getPath().endsWith("/")) {
- this.url =
this.url.resolve(Strings.nullToEmpty(this.url.getPath()) + "/");
+ if (StringUtils.isEmpty(this.url.getPath()) ||
!this.url.getPath().endsWith("/")) {
+ this.url = this.url.resolve((this.url.getPath() == null ? "" :
this.url.getPath()) + "/");
Review comment:
@andreituicu can you use optionals instead?
```suggestion
this.url =
this.url.resolve(Optional.ofNullable(this.url.getPath()).orElse("") + "/");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]