Revision de8249cf
Added by Andreas Müller over 3 years ago
cdmlib-remote/src/test/java/eu/etaxonomy/cdm/remote/server/ServerRunning.java | ||
---|---|---|
10 | 10 |
import java.io.IOException; |
11 | 11 |
import java.io.UnsupportedEncodingException; |
12 | 12 |
import java.net.HttpURLConnection; |
13 |
import java.net.URI; |
|
14 | 13 |
import java.net.URISyntaxException; |
15 | 14 |
import java.net.URLDecoder; |
16 | 15 |
import java.util.Arrays; |
... | ... | |
44 | 43 |
import org.springframework.web.util.UriTemplate; |
45 | 44 |
import org.springframework.web.util.UriUtils; |
46 | 45 |
|
46 |
import eu.etaxonomy.cdm.common.URI; |
|
47 |
|
|
47 | 48 |
/** |
48 | 49 |
* <p> |
49 | 50 |
* A rule that prevents integration tests from failing if the server application is not running or not accessible. If |
... | ... | |
278 | 279 |
public String getForRedirect(String path, final HttpHeaders headers) { |
279 | 280 |
ResponseEntity<Void> response = client.exchange(getUrl(path), HttpMethod.GET, new HttpEntity<Void>((Void) null, |
280 | 281 |
headers), Void.class); |
281 |
URI location = response.getHeaders().getLocation();
|
|
282 |
URI location = new URI(response.getHeaders().getLocation());
|
|
282 | 283 |
try { |
283 | 284 |
return URLDecoder.decode(location.toString(), "UTF-8"); |
284 | 285 |
} catch (UnsupportedEncodingException e) { |
Also available in: Unified diff
ref #9114 add URI Wrapper and replace all java.net.URI occurrences by the wrapper in cdmlib