Browse Source

Polish Javadoc

pull/25594/head
Sam Brannen 6 years ago
parent
commit
d2db43a900
  1. 8
      spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
  2. 11
      spring-web/src/main/java/org/springframework/http/HttpHeaders.java

8
spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2019 the original author or authors. * Copyright 2002-2020 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -424,7 +424,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/** /**
* Return the names of all specified headers as a Set of Strings. * Return the names of all specified headers as a Set of Strings.
* <p>As of Servlet 3.0, this method is also defined HttpServletResponse. * <p>As of Servlet 3.0, this method is also defined in {@link HttpServletResponse}.
* @return the {@code Set} of header name {@code Strings}, or an empty {@code Set} if none * @return the {@code Set} of header name {@code Strings}, or an empty {@code Set} if none
*/ */
@Override @Override
@ -435,7 +435,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/** /**
* Return the primary value for the given header as a String, if any. * Return the primary value for the given header as a String, if any.
* Will return the first value in case of multiple values. * Will return the first value in case of multiple values.
* <p>As of Servlet 3.0, this method is also defined in HttpServletResponse. * <p>As of Servlet 3.0, this method is also defined in {@link HttpServletResponse}.
* As of Spring 3.1, it returns a stringified value for Servlet 3.0 compatibility. * As of Spring 3.1, it returns a stringified value for Servlet 3.0 compatibility.
* Consider using {@link #getHeaderValue(String)} for raw Object access. * Consider using {@link #getHeaderValue(String)} for raw Object access.
* @param name the name of the header * @param name the name of the header
@ -450,7 +450,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/** /**
* Return all values for the given header as a List of Strings. * Return all values for the given header as a List of Strings.
* <p>As of Servlet 3.0, this method is also defined in HttpServletResponse. * <p>As of Servlet 3.0, this method is also defined in {@link HttpServletResponse}.
* As of Spring 3.1, it returns a List of stringified values for Servlet 3.0 compatibility. * As of Spring 3.1, it returns a List of stringified values for Servlet 3.0 compatibility.
* Consider using {@link #getHeaderValues(String)} for raw Object access. * Consider using {@link #getHeaderValues(String)} for raw Object access.
* @param name the name of the header * @param name the name of the header

11
spring-web/src/main/java/org/springframework/http/HttpHeaders.java

@ -906,11 +906,12 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
} }
/** /**
* Return the first {@link Locale} of the content languages, * Get the first {@link Locale} of the content languages, as specified by the
* as specified by the {@literal Content-Language} header. * {@code Content-Language} header.
* <p>Returns {@code null} when the content language is unknown. * <p>Use {@link #getValuesAsList(String)} if you need to get multiple content
* <p>Use {@code getValuesAsList(CONTENT_LANGUAGE)} if you need * languages.
* to get multiple content languages.</p> * @return the first {@code Locale} of the content languages, or {@code null}
* if unknown
* @since 5.0 * @since 5.0
*/ */
@Nullable @Nullable

Loading…
Cancel
Save