Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpHead;
import org.apache.http.impl.client.DefaultHttpClient;
Expand All @@ -41,7 +40,7 @@
public class TestHttp extends AbstractTestNGSpringContextTests {
@Test
@Parameters("template-url")
public void testHttpclient(String templateUrl) {
public void testHttpclient(String templateUrl) throws IOException {
final HttpHead method = new HttpHead(templateUrl);
final DefaultHttpClient client = new DefaultHttpClient();

Expand All @@ -62,20 +61,9 @@ public void testHttpclient(String templateUrl) {

output = new BufferedOutputStream(new FileOutputStream(localFile));
entity.writeTo(output);
} catch (final ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (final IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
try {
if (output != null) {
output.close();
}
} catch (final IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
if (output != null) {
output.close();
}
}

Expand Down