Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
This commit is contained in:
@@ -23,7 +23,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
|
||||
/**
|
||||
* Hibernate-specific subclass of UncategorizedDataAccessException,
|
||||
* for Hibernate system errors that do not match any concrete
|
||||
* <code>org.springframework.dao</code> exceptions.
|
||||
* {@code org.springframework.dao} exceptions.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.1
|
||||
|
||||
@@ -50,7 +50,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
|
||||
* implementation for a single Hibernate {@link org.hibernate.SessionFactory}.
|
||||
* Binds a Hibernate Session from the specified factory to the thread,
|
||||
* potentially allowing for one thread-bound Session per factory.
|
||||
* <code>SessionFactory.getCurrentSession()</code> is required for Hibernate
|
||||
* {@code SessionFactory.getCurrentSession()} is required for Hibernate
|
||||
* access code that needs to support this transaction handling mechanism,
|
||||
* with the SessionFactory being configured with {@link SpringSessionContext}.
|
||||
*
|
||||
@@ -188,7 +188,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
|
||||
/**
|
||||
* Set whether to autodetect a JDBC DataSource used by the Hibernate SessionFactory,
|
||||
* if set via SessionFactoryBuilder's <code>setDataSource</code>. Default is "true".
|
||||
* if set via SessionFactoryBuilder's {@code setDataSource}. Default is "true".
|
||||
* <p>Can be turned off to deliberately ignore an available DataSource, in order
|
||||
* to not expose Hibernate transactions as JDBC transactions for that DataSource.
|
||||
* @see #setDataSource
|
||||
@@ -204,7 +204,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
* JDBC Connection.
|
||||
* <p>Default is "true". If you turn this flag off, the transaction manager
|
||||
* will not support per-transaction isolation levels anymore. It will not
|
||||
* call <code>Connection.setReadOnly(true)</code> for read-only transactions
|
||||
* call {@code Connection.setReadOnly(true)} for read-only transactions
|
||||
* anymore either. If this flag is turned off, no cleanup of a JDBC Connection
|
||||
* is required after a transaction, since no Connection settings will get modified.
|
||||
* @see java.sql.Connection#setTransactionIsolation
|
||||
@@ -227,14 +227,14 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
* <p>Switch this flag to "true" in order to enforce use of a Hibernate-managed Session.
|
||||
* Note that this requires {@link org.hibernate.SessionFactory#getCurrentSession()}
|
||||
* to always return a proper Session when called for a Spring-managed transaction;
|
||||
* transaction begin will fail if the <code>getCurrentSession()</code> call fails.
|
||||
* transaction begin will fail if the {@code getCurrentSession()} call fails.
|
||||
* <p>This mode will typically be used in combination with a custom Hibernate
|
||||
* {@link org.hibernate.context.CurrentSessionContext} implementation that stores
|
||||
* Sessions in a place other than Spring's TransactionSynchronizationManager.
|
||||
* It may also be used in combination with Spring's Open-Session-in-View support
|
||||
* (using Spring's default {@link SpringSessionContext}), in which case it subtly
|
||||
* differs from the Spring-managed Session mode: The pre-bound Session will <i>not</i>
|
||||
* receive a <code>clear()</code> call (on rollback) or a <code>disconnect()</code>
|
||||
* receive a {@code clear()} call (on rollback) or a {@code disconnect()}
|
||||
* call (on transaction completion) in such a scenario; this is rather left up
|
||||
* to a custom CurrentSessionContext implementation (if desired).
|
||||
*/
|
||||
@@ -583,7 +583,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
|
||||
/**
|
||||
* Convert the given HibernateException to an appropriate exception
|
||||
* from the <code>org.springframework.dao</code> hierarchy.
|
||||
* from the {@code org.springframework.dao} hierarchy.
|
||||
* <p>Will automatically apply a specified SQLExceptionTranslator to a
|
||||
* Hibernate JDBCException, else rely on Hibernate's default translation.
|
||||
* @param ex HibernateException that occured
|
||||
@@ -671,7 +671,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
|
||||
/**
|
||||
* Holder for suspended resources.
|
||||
* Used internally by <code>doSuspend</code> and <code>doResume</code>.
|
||||
* Used internally by {@code doSuspend} and {@code doResume}.
|
||||
*/
|
||||
private static class SuspendedResourcesHolder {
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ import org.springframework.core.io.support.ResourcePatternUtils;
|
||||
* then be passed to Hibernate-based data access objects via dependency injection.
|
||||
*
|
||||
* <p><b>NOTE:</b> This variant of LocalSessionFactoryBean requires Hibernate 4.0 or higher.
|
||||
* It is similar in role to the same-named class in the <code>orm.hibernate3</code> package.
|
||||
* However, in practice, it is closer to <code>AnnotationSessionFactoryBean</code> since
|
||||
* its core purpose is to bootstrap a <code>SessionFactory</code> from annotation scanning.
|
||||
* It is similar in role to the same-named class in the {@code orm.hibernate3} package.
|
||||
* However, in practice, it is closer to {@code AnnotationSessionFactoryBean} since
|
||||
* its core purpose is to bootstrap a {@code SessionFactory} from annotation scanning.
|
||||
*
|
||||
* <p><b>NOTE:</b> To set up Hibernate 4 for Spring-driven JTA transactions, make
|
||||
* sure to either specify the {@link #setJtaTransactionManager "jtaTransactionManager"}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
/**
|
||||
* Create a new LocalSessionFactoryBuilder for the given DataSource.
|
||||
* @param dataSource the JDBC DataSource that the resulting Hibernate SessionFactory should be using
|
||||
* (may be <code>null</code>)
|
||||
* (may be {@code null})
|
||||
*/
|
||||
public LocalSessionFactoryBuilder(DataSource dataSource) {
|
||||
this(dataSource, new PathMatchingResourcePatternResolver());
|
||||
@@ -88,7 +88,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
/**
|
||||
* Create a new LocalSessionFactoryBuilder for the given DataSource.
|
||||
* @param dataSource the JDBC DataSource that the resulting Hibernate SessionFactory should be using
|
||||
* (may be <code>null</code>)
|
||||
* (may be {@code null})
|
||||
* @param classLoader the ClassLoader to load application classes from
|
||||
*/
|
||||
public LocalSessionFactoryBuilder(DataSource dataSource, ClassLoader classLoader) {
|
||||
@@ -98,7 +98,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
/**
|
||||
* Create a new LocalSessionFactoryBuilder for the given DataSource.
|
||||
* @param dataSource the JDBC DataSource that the resulting Hibernate SessionFactory should be using
|
||||
* (may be <code>null</code>)
|
||||
* (may be {@code null})
|
||||
* @param resourceLoader the ResourceLoader to load application classes from
|
||||
*/
|
||||
public LocalSessionFactoryBuilder(DataSource dataSource, ResourceLoader resourceLoader) {
|
||||
|
||||
@@ -69,7 +69,7 @@ public abstract class SessionFactoryUtils {
|
||||
|
||||
/**
|
||||
* Order value for TransactionSynchronization objects that clean up Hibernate Sessions.
|
||||
* Returns <code>DataSourceUtils.CONNECTION_SYNCHRONIZATION_ORDER - 100</code>
|
||||
* Returns {@code DataSourceUtils.CONNECTION_SYNCHRONIZATION_ORDER - 100}
|
||||
* to execute Session cleanup before JDBC Connection cleanup, if any.
|
||||
* @see org.springframework.jdbc.datasource.DataSourceUtils#CONNECTION_SYNCHRONIZATION_ORDER
|
||||
*/
|
||||
@@ -82,7 +82,7 @@ public abstract class SessionFactoryUtils {
|
||||
/**
|
||||
* Determine the DataSource of the given SessionFactory.
|
||||
* @param sessionFactory the SessionFactory to check
|
||||
* @return the DataSource, or <code>null</code> if none found
|
||||
* @return the DataSource, or {@code null} if none found
|
||||
* @see org.hibernate.engine.spi.SessionFactoryImplementor#getConnectionProvider
|
||||
*/
|
||||
public static DataSource getDataSource(SessionFactory sessionFactory) {
|
||||
@@ -96,7 +96,7 @@ public abstract class SessionFactoryUtils {
|
||||
/**
|
||||
* Perform actual closing of the Hibernate Session,
|
||||
* catching and logging any cleanup exceptions thrown.
|
||||
* @param session the Hibernate Session to close (may be <code>null</code>)
|
||||
* @param session the Hibernate Session to close (may be {@code null})
|
||||
* @see org.hibernate.Session#close()
|
||||
*/
|
||||
public static void closeSession(Session session) {
|
||||
@@ -115,7 +115,7 @@ public abstract class SessionFactoryUtils {
|
||||
|
||||
/**
|
||||
* Convert the given HibernateException to an appropriate exception
|
||||
* from the <code>org.springframework.dao</code> hierarchy.
|
||||
* from the {@code org.springframework.dao} hierarchy.
|
||||
* @param ex HibernateException that occured
|
||||
* @return the corresponding DataAccessException instance
|
||||
* @see HibernateExceptionTranslator#convertHibernateAccessException
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.hibernate.Session;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationAdapter;
|
||||
|
||||
/**
|
||||
* Simple synchronization adapter that propagates a <code>flush()</code> call
|
||||
* Simple synchronization adapter that propagates a {@code flush()} call
|
||||
* to the underlying Hibernate Session. Used in combination with JTA.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
|
||||
|
||||
/**
|
||||
* Spring-specific subclass of Hibernate's JTASessionContext,
|
||||
* setting <code>FlushMode.MANUAL</code> for read-only transactions.
|
||||
* setting {@code FlushMode.MANUAL} for read-only transactions.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* Package providing integration of
|
||||
@@ -10,7 +9,7 @@
|
||||
* in order to follow native Hibernate recommendations as closely as possible.
|
||||
*
|
||||
* <p><b>This package supports Hibernate 4.x only.</b>
|
||||
* See the <code>org.springframework.orm.hibernate3</code> package for Hibernate 3.x support.
|
||||
* See the {@code org.springframework.orm.hibernate3} package for Hibernate 3.x support.
|
||||
*
|
||||
*/
|
||||
package org.springframework.orm.hibernate4;
|
||||
|
||||
@@ -52,11 +52,11 @@ import org.springframework.web.filter.OncePerRequestFilter;
|
||||
* as well as for non-transactional execution (if configured appropriately).
|
||||
*
|
||||
* <p><b>NOTE</b>: This filter will by default <i>not</i> flush the Hibernate Session,
|
||||
* with the flush mode set to <code>FlushMode.NEVER</code>. It assumes to be used
|
||||
* with the flush mode set to {@code FlushMode.NEVER}. It assumes to be used
|
||||
* in combination with service layer transactions that care for the flushing: The
|
||||
* active transaction manager will temporarily change the flush mode to
|
||||
* <code>FlushMode.AUTO</code> during a read-write transaction, with the flush
|
||||
* mode reset to <code>FlushMode.NEVER</code> at the end of each transaction.
|
||||
* {@code FlushMode.AUTO} during a read-write transaction, with the flush
|
||||
* mode reset to {@code FlushMode.NEVER} at the end of each transaction.
|
||||
*
|
||||
* <p><b>WARNING:</b> Applying this filter to existing logic can cause issues that
|
||||
* have not appeared before, through the use of a single Hibernate Session for the
|
||||
@@ -65,7 +65,7 @@ import org.springframework.web.filter.OncePerRequestFilter;
|
||||
* processing, to avoid clashes with already loaded instances of the same objects.
|
||||
*
|
||||
* <p>Looks up the SessionFactory in Spring's root web application context.
|
||||
* Supports a "sessionFactoryBeanName" filter init-param in <code>web.xml</code>;
|
||||
* Supports a "sessionFactoryBeanName" filter init-param in {@code web.xml};
|
||||
* the default bean name is "sessionFactory". Looks up the SessionFactory on each
|
||||
* request, to avoid initialization order issues (when using ContextLoaderServlet,
|
||||
* the root application context will get initialized <i>after</i> this filter).
|
||||
@@ -194,8 +194,8 @@ public class OpenSessionInViewFilter extends OncePerRequestFilter {
|
||||
/**
|
||||
* Open a Session for the SessionFactory that this filter uses.
|
||||
* <p>The default implementation delegates to the
|
||||
* <code>SessionFactory.openSession</code> method and
|
||||
* sets the <code>Session</code>'s flush mode to "MANUAL".
|
||||
* {@code SessionFactory.openSession} method and
|
||||
* sets the {@code Session}'s flush mode to "MANUAL".
|
||||
* @param sessionFactory the SessionFactory that this filter uses
|
||||
* @return the Session to use
|
||||
* @throws DataAccessResourceFailureException if the Session could not be created
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.web.context.request.async.WebAsyncManager;
|
||||
import org.springframework.web.context.request.async.WebAsyncUtils;
|
||||
|
||||
/**
|
||||
* Spring web request interceptor that binds a Hibernate <code>Session</code> to the
|
||||
* Spring web request interceptor that binds a Hibernate {@code Session} to the
|
||||
* thread for the entire processing of the request.
|
||||
*
|
||||
* <p>This class is a concrete expression of the "Open Session in View" pattern, which
|
||||
@@ -55,8 +55,8 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
|
||||
*
|
||||
* <p><b>WARNING:</b> Applying this interceptor to existing logic can cause issues
|
||||
* that have not appeared before, through the use of a single Hibernate
|
||||
* <code>Session</code> for the processing of an entire request. In particular, the
|
||||
* reassociation of persistent objects with a Hibernate <code>Session</code> has to
|
||||
* {@code Session} for the processing of an entire request. In particular, the
|
||||
* reassociation of persistent objects with a Hibernate {@code Session} has to
|
||||
* occur at the very beginning of request processing, to avoid clashes with already
|
||||
* loaded instances of the same objects.
|
||||
*
|
||||
@@ -69,8 +69,8 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
|
||||
public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor {
|
||||
|
||||
/**
|
||||
* Suffix that gets appended to the <code>SessionFactory</code>
|
||||
* <code>toString()</code> representation for the "participate in existing
|
||||
* Suffix that gets appended to the {@code SessionFactory}
|
||||
* {@code toString()} representation for the "participate in existing
|
||||
* session handling" request attribute.
|
||||
* @see #getParticipateAttributeName
|
||||
*/
|
||||
@@ -91,8 +91,8 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
|
||||
|
||||
|
||||
/**
|
||||
* Open a new Hibernate <code>Session</code> according to the settings of this
|
||||
* <code>HibernateAccessor</code> and bind it to the thread via the
|
||||
* Open a new Hibernate {@code Session} according to the settings of this
|
||||
* {@code HibernateAccessor} and bind it to the thread via the
|
||||
* {@link org.springframework.transaction.support.TransactionSynchronizationManager}.
|
||||
*/
|
||||
public void preHandle(WebRequest request) throws DataAccessException {
|
||||
@@ -127,7 +127,7 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
|
||||
}
|
||||
|
||||
/**
|
||||
* Unbind the Hibernate <code>Session</code> from the thread and close it).
|
||||
* Unbind the Hibernate {@code Session} from the thread and close it).
|
||||
* @see org.springframework.transaction.support.TransactionSynchronizationManager
|
||||
*/
|
||||
public void afterCompletion(WebRequest request, Exception ex) throws DataAccessException {
|
||||
@@ -165,8 +165,8 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
|
||||
/**
|
||||
* Open a Session for the SessionFactory that this interceptor uses.
|
||||
* <p>The default implementation delegates to the
|
||||
* <code>SessionFactory.openSession</code> method and
|
||||
* sets the <code>Session</code>'s flush mode to "MANUAL".
|
||||
* {@code SessionFactory.openSession} method and
|
||||
* sets the {@code Session}'s flush mode to "MANUAL".
|
||||
* @return the Session to use
|
||||
* @throws DataAccessResourceFailureException if the Session could not be created
|
||||
* @see org.hibernate.FlushMode#MANUAL
|
||||
@@ -185,8 +185,8 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
|
||||
/**
|
||||
* Return the name of the request attribute that identifies that a request is
|
||||
* already intercepted.
|
||||
* <p>The default implementation takes the <code>toString()</code> representation
|
||||
* of the <code>SessionFactory</code> instance and appends {@link #PARTICIPATE_SUFFIX}.
|
||||
* <p>The default implementation takes the {@code toString()} representation
|
||||
* of the {@code SessionFactory} instance and appends {@link #PARTICIPATE_SUFFIX}.
|
||||
*/
|
||||
protected String getParticipateAttributeName() {
|
||||
return getSessionFactory().toString() + PARTICIPATE_SUFFIX;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* Classes supporting the <code>org.springframework.orm.hibernate4</code> package.
|
||||
* Classes supporting the {@code org.springframework.orm.hibernate4} package.
|
||||
*
|
||||
*/
|
||||
package org.springframework.orm.hibernate4.support;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class DelegatingServletInputStream extends ServletInputStream {
|
||||
|
||||
/**
|
||||
* Create a DelegatingServletInputStream for the given source stream.
|
||||
* @param sourceStream the source stream (never <code>null</code>)
|
||||
* @param sourceStream the source stream (never {@code null})
|
||||
*/
|
||||
public DelegatingServletInputStream(InputStream sourceStream) {
|
||||
Assert.notNull(sourceStream, "Source InputStream must not be null");
|
||||
@@ -47,7 +47,7 @@ public class DelegatingServletInputStream extends ServletInputStream {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the underlying source stream (never <code>null</code>).
|
||||
* Return the underlying source stream (never {@code null}).
|
||||
*/
|
||||
public final InputStream getSourceStream() {
|
||||
return this.sourceStream;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
|
||||
|
||||
/**
|
||||
* Create a DelegatingServletOutputStream for the given target stream.
|
||||
* @param targetStream the target stream (never <code>null</code>)
|
||||
* @param targetStream the target stream (never {@code null})
|
||||
*/
|
||||
public DelegatingServletOutputStream(OutputStream targetStream) {
|
||||
Assert.notNull(targetStream, "Target OutputStream must not be null");
|
||||
@@ -47,7 +47,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the underlying target stream (never <code>null</code>).
|
||||
* Return the underlying target stream (never {@code null}).
|
||||
*/
|
||||
public final OutputStream getTargetStream() {
|
||||
return this.targetStream;
|
||||
|
||||
@@ -81,7 +81,7 @@ class HeaderValueHolder {
|
||||
* @param headers the Map of header names to HeaderValueHolders
|
||||
* @param name the name of the desired header
|
||||
* @return the corresponding HeaderValueHolder,
|
||||
* or <code>null</code> if none found
|
||||
* or {@code null} if none found
|
||||
*/
|
||||
public static HeaderValueHolder getByName(Map<String, HeaderValueHolder> headers, String name) {
|
||||
Assert.notNull(name, "Header name must not be null");
|
||||
|
||||
@@ -51,7 +51,7 @@ import org.springframework.util.LinkedCaseInsensitiveMap;
|
||||
* Mock implementation of the {@link javax.servlet.http.HttpServletRequest} interface.
|
||||
*
|
||||
* <p>Compatible with Servlet 2.5 and partially with Servlet 3.0 (notable exceptions:
|
||||
* the <code>getPart(s)</code> and <code>startAsync</code> families of methods).
|
||||
* the {@code getPart(s)} and {@code startAsync} families of methods).
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Rod Johnson
|
||||
@@ -193,9 +193,9 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
|
||||
/**
|
||||
* Create a new {@code MockHttpServletRequest} with a default
|
||||
* {@link org.springframework.mock.web.MockServletContext}.
|
||||
* @param method the request method (may be <code>null</code>)
|
||||
* @param requestURI the request URI (may be <code>null</code>)
|
||||
* {@link MockServletContext}.
|
||||
* @param method the request method (may be {@code null})
|
||||
* @param requestURI the request URI (may be {@code null})
|
||||
* @see #setMethod
|
||||
* @see #setRequestURI
|
||||
* @see #MockHttpServletRequest(javax.servlet.ServletContext, String, String)
|
||||
@@ -207,7 +207,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
/**
|
||||
* Create a new {@code MockHttpServletRequest} with the supplied {@link javax.servlet.ServletContext}.
|
||||
* @param servletContext the ServletContext that the request runs in (may be
|
||||
* <code>null</code> to use a default {@link org.springframework.mock.web.MockServletContext})
|
||||
* {@code null} to use a default {@link MockServletContext})
|
||||
* @see #MockHttpServletRequest(javax.servlet.ServletContext, String, String)
|
||||
*/
|
||||
public MockHttpServletRequest(ServletContext servletContext) {
|
||||
@@ -219,13 +219,13 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
* {@code method}, and {@code requestURI}.
|
||||
* <p>The preferred locale will be set to {@link java.util.Locale#ENGLISH}.
|
||||
* @param servletContext the ServletContext that the request runs in (may be
|
||||
* <code>null</code> to use a default {@link org.springframework.mock.web.MockServletContext})
|
||||
* @param method the request method (may be <code>null</code>)
|
||||
* @param requestURI the request URI (may be <code>null</code>)
|
||||
* {@code null} to use a default {@link MockServletContext})
|
||||
* @param method the request method (may be {@code null})
|
||||
* @param requestURI the request URI (may be {@code null})
|
||||
* @see #setMethod
|
||||
* @see #setRequestURI
|
||||
* @see #setPreferredLocales
|
||||
* @see org.springframework.mock.web.MockServletContext
|
||||
* @see MockServletContext
|
||||
*/
|
||||
public MockHttpServletRequest(ServletContext servletContext, String method, String requestURI) {
|
||||
this.servletContext = (servletContext != null ? servletContext : new MockServletContext());
|
||||
@@ -662,8 +662,8 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
* adding the given value (more specifically, its toString representation)
|
||||
* as further element.
|
||||
* <p>Multiple values can only be stored as list of Strings, following the
|
||||
* Servlet spec (see <code>getHeaders</code> accessor). As alternative to
|
||||
* repeated <code>addHeader</code> calls for individual elements, you can
|
||||
* Servlet spec (see {@code getHeaders} accessor). As alternative to
|
||||
* repeated {@code addHeader} calls for individual elements, you can
|
||||
* use a single call with an entire array or Collection of values as
|
||||
* parameter.
|
||||
* @see #getHeaderNames
|
||||
|
||||
@@ -108,7 +108,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||
|
||||
/**
|
||||
* Set whether {@link #getOutputStream()} access is allowed.
|
||||
* <p>Default is <code>true</code>.
|
||||
* <p>Default is {@code true}.
|
||||
*/
|
||||
public void setOutputStreamAccessAllowed(boolean outputStreamAccessAllowed) {
|
||||
this.outputStreamAccessAllowed = outputStreamAccessAllowed;
|
||||
@@ -123,7 +123,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||
|
||||
/**
|
||||
* Set whether {@link #getWriter()} access is allowed.
|
||||
* <p>Default is <code>true</code>.
|
||||
* <p>Default is {@code true}.
|
||||
*/
|
||||
public void setWriterAccessAllowed(boolean writerAccessAllowed) {
|
||||
this.writerAccessAllowed = writerAccessAllowed;
|
||||
@@ -297,7 +297,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||
/**
|
||||
* Return the names of all specified headers as a Set of Strings.
|
||||
* <p>As of Servlet 3.0, this method is also defined HttpServletResponse.
|
||||
* @return the <code>Set</code> of header name <code>Strings</code>, or an empty <code>Set</code> if none
|
||||
* @return the {@code Set} of header name {@code Strings}, or an empty {@code Set} if none
|
||||
*/
|
||||
public Set<String> getHeaderNames() {
|
||||
return this.headers.keySet();
|
||||
@@ -310,7 +310,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||
* As of Spring 3.1, it returns a stringified value for Servlet 3.0 compatibility.
|
||||
* Consider using {@link #getHeaderValue(String)} for raw Object access.
|
||||
* @param name the name of the header
|
||||
* @return the associated header value, or <code>null<code> if none
|
||||
* @return the associated header value, or {@code null} if none
|
||||
*/
|
||||
public String getHeader(String name) {
|
||||
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
|
||||
@@ -339,7 +339,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||
* Return the primary value for the given header, if any.
|
||||
* <p>Will return the first value in case of multiple values.
|
||||
* @param name the name of the header
|
||||
* @return the associated header value, or <code>null<code> if none
|
||||
* @return the associated header value, or {@code null} if none
|
||||
*/
|
||||
public Object getHeaderValue(String name) {
|
||||
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
|
||||
|
||||
Reference in New Issue
Block a user