Polishing

This commit is contained in:
Juergen Hoeller
2014-03-11 22:09:46 +01:00
parent 8b2b165777
commit 4d3ca4319e
10 changed files with 72 additions and 67 deletions

View File

@@ -31,6 +31,7 @@ import org.springframework.util.Assert;
* that use JAXB2. Creates {@link JAXBContext} object lazily.
*
* @author Arjen Poutsma
* @author Rossen Stoyanchev
* @since 3.0
*/
public abstract class AbstractJaxb2HttpMessageConverter<T> extends AbstractXmlHttpMessageConverter<T> {
@@ -61,8 +62,8 @@ public abstract class AbstractJaxb2HttpMessageConverter<T> extends AbstractXmlHt
* Customize the {@link Marshaller} created by this
* message converter before using it to write the object to the output.
* @param marshaller the marshaller to customize
* @see #createMarshaller(Class)
* @since 4.0.3
* @see #createMarshaller(Class)
*/
protected void customizeMarshaller(Marshaller marshaller) {
}
@@ -90,8 +91,8 @@ public abstract class AbstractJaxb2HttpMessageConverter<T> extends AbstractXmlHt
* Customize the {@link Unmarshaller} created by this
* message converter before using it to read the object from the input.
* @param unmarshaller the unmarshaller to customize
* @see #createUnmarshaller(Class)
* @since 4.0.3
* @see #createUnmarshaller(Class)
*/
protected void customizeUnmarshaller(Unmarshaller unmarshaller) {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.http.HttpHeaders;
@@ -116,11 +115,12 @@ public class ServletServerHttpResponse implements ServerHttpResponse {
}
}
/**
* Extends HttpHeaders with the ability to look up headers already present in
* the underlying HttpServletResponse.
*
* The intent is merely to expose what is available through the HttpServletResponse
* <p>The intent is merely to expose what is available through the HttpServletResponse
* i.e. the ability to look up specific header values by name. All other
* map-related operations (e.g. iteration, removal, etc) apply only to values
* added directly through HttpHeaders methods.
@@ -144,8 +144,8 @@ public class ServletServerHttpResponse implements ServerHttpResponse {
@Override
public List<String> get(Object key) {
Assert.isInstanceOf(String.class, key, "Key must be a String-based header name");
Assert.isInstanceOf(String.class, key, "key must be a String-based header name");
Collection<String> values1 = servletResponse.getHeaders((String) key);
boolean isEmpty1 = CollectionUtils.isEmpty(values1);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -277,7 +277,7 @@ public abstract class WebUtils {
* @throws IllegalStateException if the session attribute could not be found
*/
public static Object getRequiredSessionAttribute(HttpServletRequest request, String name)
throws IllegalStateException {
throws IllegalStateException {
Object attr = getSessionAttribute(request, name);
if (attr == null) {