diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-08-24 11:38:25 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-08-27 08:52:34 +0900 |
commit | e5b72a4d36284230c69363d89bd9d9db0bfbd82f (patch) | |
tree | af097f83336fd112bd0821d43a6d474c8b5056f6 /org.eclipse.jgit.http.test/tst | |
parent | 0a13545966fb72e0900180e037e90ed2dcc637a4 (diff) | |
download | jgit-e5b72a4d36284230c69363d89bd9d9db0bfbd82f.tar.gz jgit-e5b72a4d36284230c69363d89bd9d9db0bfbd82f.zip |
HttpClientConnectionTest: Throw UnsupportedOperationException for unused methods
The HttpResponseMock class is only used in a single test to assert
on the expected headers. All of its overridden methods are empty, and
this results in warnings in Eclipse:
'Empty block should be documented'
Rather than adding "// Not used" comments, change all of the methods'
implementations to throw UnsupportedOperationException. This not only
gets rid of the warnings, but also makes it explicit that we don't
intend any of them to actually be called.
Change-Id: I8fe06b155e0809bb3507e4e28b00fcc4f9333b0b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java index f43bce787a..72c4921de6 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/transport/http/apache/HttpClientConnectionTest.java @@ -80,58 +80,58 @@ public class HttpClientConnectionTest { implements HttpResponse { @Override public StatusLine getStatusLine() { - return null; + throw new UnsupportedOperationException(); } @Override public void setStatusLine(StatusLine statusLine) { - + throw new UnsupportedOperationException(); } @Override public void setStatusLine(ProtocolVersion protocolVersion, int i) { - + throw new UnsupportedOperationException(); } @Override public void setStatusLine(ProtocolVersion protocolVersion, int i, String s) { - + throw new UnsupportedOperationException(); } @Override public void setStatusCode(int i) throws IllegalStateException { - + throw new UnsupportedOperationException(); } @Override public void setReasonPhrase(String s) throws IllegalStateException { - + throw new UnsupportedOperationException(); } @Override public HttpEntity getEntity() { - return null; + throw new UnsupportedOperationException(); } @Override public void setEntity(HttpEntity httpEntity) { - + throw new UnsupportedOperationException(); } @Override public Locale getLocale() { - return null; + throw new UnsupportedOperationException(); } @Override public void setLocale(Locale locale) { - + throw new UnsupportedOperationException(); } @Override public ProtocolVersion getProtocolVersion() { - return null; + throw new UnsupportedOperationException(); } } } |