diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java index 91e1b72ee7..545d45052c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java @@ -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. @@ -50,6 +50,7 @@ import org.springframework.beans.factory.DisposableBean; * @see #releaseTarget * @see #destroy */ +@SuppressWarnings("serial") public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBasedTargetSource implements PoolingConfig, DisposableBean { diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java index 4880d5119b..24e0286e97 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java @@ -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. @@ -43,6 +43,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory; * @see ThreadLocalTargetSource * @see CommonsPoolTargetSource */ +@SuppressWarnings("serial") public abstract class AbstractPrototypeBasedTargetSource extends AbstractBeanFactoryBasedTargetSource { @Override diff --git a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java index 47a35f756e..a48621ae00 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java @@ -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. @@ -24,8 +24,8 @@ import org.springframework.beans.BeansException; import org.springframework.core.Constants; /** - * TargetSource implementation that holds objects in a configurable - * Jakarta Commons Pool. + * {@link org.springframework.aop.TargetSource} implementation that holds + * objects in a configurable Apache Commons Pool. * *
By default, an instance of {@code GenericObjectPool} is created. * Subclasses may change the type of {@code ObjectPool} used by @@ -38,10 +38,12 @@ import org.springframework.core.Constants; * of configuration properties that are relevant to your chosen implementation. * *
The {@code testOnBorrow}, {@code testOnReturn} and {@code testWhileIdle} - * properties are explictly not mirrored because the implementation of + * properties are explicitly not mirrored because the implementation of * {@code PoolableObjectFactory} used by this class does not implement - * meaningful validation. All exposed Commons Pool properties use the corresponding - * Commons Pool defaults: for example, + * meaningful validation. All exposed Commons Pool properties use the + * corresponding Commons Pool defaults. + * + *
Compatible with Apache Commons Pool 1.5.x and 1.6. * * @author Rod Johnson * @author Rob Harrop @@ -55,10 +57,8 @@ import org.springframework.core.Constants; * @see #setTimeBetweenEvictionRunsMillis * @see #setMinEvictableIdleTimeMillis */ -public class CommonsPoolTargetSource extends AbstractPoolingTargetSource - implements PoolableObjectFactory { - - private static final long serialVersionUID = 1L; +@SuppressWarnings("serial") +public class CommonsPoolTargetSource extends AbstractPoolingTargetSource implements PoolableObjectFactory { private static final Constants constants = new Constants(GenericObjectPool.class); diff --git a/spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java index 81642f6b2e..57604a0853 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java @@ -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. @@ -19,9 +19,11 @@ package org.springframework.aop.target; import org.springframework.beans.BeansException; /** - * TargetSource that creates a new instance of the target bean for each - * request, destroying each instance on release (after each request). - * Obtains bean instances from its containing + * {@link org.springframework.aop.TargetSource} implementation that + * creates a new instance of the target bean for each request, + * destroying each instance on release (after each request). + * + *
Obtains bean instances from its containing * {@link org.springframework.beans.factory.BeanFactory}. * * @author Rod Johnson @@ -29,10 +31,9 @@ import org.springframework.beans.BeansException; * @see #setBeanFactory * @see #setTargetBeanName */ +@SuppressWarnings("serial") public class PrototypeTargetSource extends AbstractPrototypeBasedTargetSource { - private static final long serialVersionUID = 1L; - /** * Obtain a new prototype instance for every call. * @see #newPrototypeInstance() diff --git a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java index 7b100fe0da..a33681fd3c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java @@ -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. @@ -27,9 +27,10 @@ import org.springframework.beans.factory.DisposableBean; import org.springframework.core.NamedThreadLocal; /** - * Alternative to an object pool. This TargetSource uses a threading model in which - * every thread has its own copy of the target. There's no contention for targets. - * Target object creation is kept to a minimum on the running server. + * Alternative to an object pool. This {@link org.springframework.aop.TargetSource} + * uses a threading model in which every thread has its own copy of the target. + * There's no contention for targets. Target object creation is kept to a minimum + * on the running server. * *
Application code is written as to a normal pool; callers can't assume they * will be dealing with the same instance in invocations in different threads. @@ -47,11 +48,10 @@ import org.springframework.core.NamedThreadLocal; * @see ThreadLocalTargetSourceStats * @see org.springframework.beans.factory.DisposableBean#destroy() */ +@SuppressWarnings("serial") public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource implements ThreadLocalTargetSourceStats, DisposableBean { - private static final long serialVersionUID = 1L; - /** * ThreadLocal holding the target associated with the current * thread. Unlike most ThreadLocals, which are static, this variable @@ -80,10 +80,8 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource Object target = this.targetInThread.get(); if (target == null) { if (logger.isDebugEnabled()) { - logger.debug("No target for prototype '" + getTargetBeanName() + - "' bound to thread: " + - "creating one and binding it to thread '" + - Thread.currentThread().getName() + "'"); + logger.debug("No target for prototype '" + getTargetBeanName() + "' bound to thread: " + + "creating one and binding it to thread '" + Thread.currentThread().getName() + "'"); } // Associate target with ThreadLocal. target = newPrototypeInstance(); diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java index 7cef875f28..5af22e5bbf 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java @@ -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. @@ -78,11 +78,10 @@ import org.springframework.util.ClassUtils; * @see org.springframework.orm.jpa.support.SharedEntityManagerBean * @see javax.persistence.spi.PersistenceProvider#createContainerEntityManagerFactory */ +@SuppressWarnings("serial") public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManagerFactoryBean implements ResourceLoaderAware, LoadTimeWeaverAware { - private static final long serialVersionUID = 1L; - private PersistenceUnitManager persistenceUnitManager; private final DefaultPersistenceUnitManager internalPersistenceUnitManager = @@ -129,6 +128,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage * Uses the specified persistence unit name as the name of the default * persistence unit, if applicable. *
NOTE: Only applied if no external PersistenceUnitManager specified. + * @see DefaultPersistenceUnitManager#setDefaultPersistenceUnitName */ @Override public void setPersistenceUnitName(String persistenceUnitName) { @@ -148,6 +148,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage * @param packagesToScan one or more base packages to search, analogous to * Spring's component-scan configuration for regular Spring components * @see #setPersistenceUnitManager + * @see DefaultPersistenceUnitManager#setPackagesToScan */ public void setPackagesToScan(String... packagesToScan) { this.internalPersistenceUnitManager.setPackagesToScan(packagesToScan); @@ -163,6 +164,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage * so that they can be loaded through {@code ClassLoader.getResource}. *
NOTE: Only applied if no external PersistenceUnitManager specified.
* @see #setPersistenceUnitManager
+ * @see DefaultPersistenceUnitManager#setMappingResources
*/
public void setMappingResources(String... mappingResources) {
this.internalPersistenceUnitManager.setMappingResources(mappingResources);
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBean.java
index 0913d234f0..f0bf7d59d7 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBean.java
@@ -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.
@@ -57,7 +57,6 @@ import javax.persistence.spi.PersistenceProvider;
* @since 2.0
* @see #setJpaProperties
* @see #setJpaVendorAdapter
- * @see JpaTemplate#setEntityManagerFactory
* @see JpaTransactionManager#setEntityManagerFactory
* @see LocalContainerEntityManagerFactoryBean
* @see org.springframework.jndi.JndiObjectFactoryBean
@@ -65,10 +64,9 @@ import javax.persistence.spi.PersistenceProvider;
* @see javax.persistence.Persistence#createEntityManagerFactory
* @see javax.persistence.spi.PersistenceProvider#createEntityManagerFactory
*/
+@SuppressWarnings("serial")
public class LocalEntityManagerFactoryBean extends AbstractEntityManagerFactoryBean {
- private static final long serialVersionUID = 1L;
-
/**
* Initialize the EntityManagerFactory for the given configuration.
* @throws javax.persistence.PersistenceException in case of JPA initialization errors
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java
index 983930714c..4cb05bc81e 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java
@@ -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.
@@ -42,13 +42,11 @@ import org.springframework.util.StringUtils;
*
* @author Rossen Stoyanchev
* @since 3.1
- *
* @see FlashMapManager
*/
+@SuppressWarnings("serial")
public final class FlashMap extends HashMap