Polishing

This commit is contained in:
Juergen Hoeller
2014-02-14 23:40:03 +01:00
parent ef1748f694
commit 8a96d1a6ee
5 changed files with 28 additions and 25 deletions

View File

@@ -226,9 +226,9 @@ public final class ProducesRequestCondition extends AbstractRequestCondition<Pro
}
return 0;
}
catch (HttpMediaTypeNotAcceptableException e) {
catch (HttpMediaTypeNotAcceptableException ex) {
// should never happen
throw new IllegalStateException("Cannot compare without having any requested media types");
throw new IllegalStateException("Cannot compare without having any requested media types", ex);
}
}

View File

@@ -89,7 +89,6 @@ public final class RequestMethodsRequestCondition extends AbstractRequestConditi
/**
* Check if any of the HTTP request methods match the given request and
* return an instance that contains the matching HTTP request method only.
*
* @param request the current request
* @return the same instance if the condition is empty, a new condition with
* the matched request method, or {@code null} if no request methods match
@@ -114,7 +113,7 @@ public final class RequestMethodsRequestCondition extends AbstractRequestConditi
try {
return RequestMethod.valueOf(request.getMethod());
}
catch (IllegalArgumentException e) {
catch (IllegalArgumentException ex) {
return null;
}
}

View File

@@ -383,7 +383,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
private String getHttpMethod() {
return isMethodBrowserSupported(getMethod()) ? getMethod() : DEFAULT_METHOD;
return (isMethodBrowserSupported(getMethod()) ? getMethod() : DEFAULT_METHOD);
}
private void assertHttpMethod(String method) {