Removed the throwing of NullPointerException from AdditionalRequestHeadersInterceptor since that isn't common due to NullPointerException being a runtime exception

This commit is contained in:
Clayton Bodendein 2017-10-30 12:01:56 -05:00
parent 462557b110
commit 7076b55f8c
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ public class AdditionalRequestHeadersInterceptor implements IClientInterceptor {
* @param headerValue the value to add for the header
* @throws NullPointerException if either parameter is {@code null}
*/
public void addHeaderValue(String headerName, String headerValue) throws NullPointerException {
public void addHeaderValue(String headerName, String headerValue) {
Objects.requireNonNull(headerName, "headerName cannot be null");
Objects.requireNonNull(headerValue, "headerValue cannot be null");
@ -49,7 +49,7 @@ public class AdditionalRequestHeadersInterceptor implements IClientInterceptor {
* @param headerValues the list of values to add for the header
* @throws NullPointerException if either parameter is {@code null}
*/
public void addAllHeaderValues(String headerName, List<String> headerValues) throws NullPointerException {
public void addAllHeaderValues(String headerName, List<String> headerValues) {
Objects.requireNonNull(headerName, "headerName cannot be null");
Objects.requireNonNull(headerValues, "headerValues cannot be null");