Use URI#create instead of URI constructor where feasible in spring-test
This commit is contained in:
@@ -18,7 +18,6 @@ package org.springframework.mock.http.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.client.ClientHttpRequest;
|
||||
@@ -51,12 +50,7 @@ public class MockClientHttpRequest extends MockHttpOutputMessage implements Clie
|
||||
*/
|
||||
public MockClientHttpRequest() {
|
||||
this.httpMethod = HttpMethod.GET;
|
||||
try {
|
||||
this.uri = new URI("/");
|
||||
}
|
||||
catch (URISyntaxException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
this.uri = URI.create("/");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user