Browse Source

Added @Override and @Deprecated annotations to context module

conversation
Arjen Poutsma 17 years ago
parent
commit
77ad22e338
  1. 3
      org.springframework.context/src/main/java/org/springframework/context/access/ContextSingletonBeanFactoryLocator.java
  2. 5
      org.springframework.context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
  3. 2
      org.springframework.context/src/main/java/org/springframework/context/config/AbstractPropertyLoadingBeanDefinitionParser.java
  4. 3
      org.springframework.context/src/main/java/org/springframework/context/config/LoadTimeWeaverBeanDefinitionParser.java
  5. 2
      org.springframework.context/src/main/java/org/springframework/context/config/MBeanExportBeanDefinitionParser.java
  6. 2
      org.springframework.context/src/main/java/org/springframework/context/config/MBeanServerBeanDefinitionParser.java
  7. 1
      org.springframework.context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java
  8. 1
      org.springframework.context/src/main/java/org/springframework/context/config/PropertyPlaceholderBeanDefinitionParser.java
  9. 1
      org.springframework.context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java
  10. 2
      org.springframework.context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java
  11. 2
      org.springframework.context/src/main/java/org/springframework/context/support/AbstractMessageSource.java
  12. 3
      org.springframework.context/src/main/java/org/springframework/context/support/AbstractRefreshableApplicationContext.java
  13. 1
      org.springframework.context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java
  14. 1
      org.springframework.context/src/main/java/org/springframework/context/support/AbstractXmlApplicationContext.java
  15. 1
      org.springframework.context/src/main/java/org/springframework/context/support/ClassPathXmlApplicationContext.java
  16. 3
      org.springframework.context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java
  17. 3
      org.springframework.context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java
  18. 1
      org.springframework.context/src/main/java/org/springframework/context/support/FileSystemXmlApplicationContext.java
  19. 6
      org.springframework.context/src/main/java/org/springframework/context/support/GenericApplicationContext.java
  20. 3
      org.springframework.context/src/main/java/org/springframework/context/support/MessageSourceResourceBundle.java
  21. 3
      org.springframework.context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java
  22. 3
      org.springframework.context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java
  23. 2
      org.springframework.context/src/main/java/org/springframework/context/support/ResourceMapFactoryBean.java
  24. 2
      org.springframework.context/src/main/java/org/springframework/context/support/StaticMessageSource.java
  25. 4
      org.springframework.context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java
  26. 1
      org.springframework.context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java
  27. 2
      org.springframework.context/src/main/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptor.java
  28. 1
      org.springframework.context/src/main/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBean.java
  29. 2
      org.springframework.context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java
  30. 1
      org.springframework.context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java
  31. 2
      org.springframework.context/src/main/java/org/springframework/ejb/config/AbstractJndiLocatingBeanDefinitionParser.java
  32. 3
      org.springframework.context/src/main/java/org/springframework/ejb/config/JndiLookupBeanDefinitionParser.java
  33. 1
      org.springframework.context/src/main/java/org/springframework/ejb/config/LocalStatelessSessionBeanDefinitionParser.java
  34. 1
      org.springframework.context/src/main/java/org/springframework/ejb/config/RemoteStatelessSessionBeanDefinitionParser.java
  35. 2
      org.springframework.context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java
  36. 1
      org.springframework.context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java
  37. 5
      org.springframework.context/src/main/java/org/springframework/instrument/classloading/ShadowingClassLoader.java
  38. 2
      org.springframework.context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java
  39. 2
      org.springframework.context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java
  40. 3
      org.springframework.context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
  41. 6
      org.springframework.context/src/main/java/org/springframework/jmx/export/SpringModelMBean.java
  42. 1
      org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/AbstractConfigurableMBeanInfoAssembler.java
  43. 3
      org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java
  44. 3
      org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java
  45. 12
      org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java
  46. 3
      org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java
  47. 3
      org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssembler.java
  48. 3
      org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/SimpleReflectiveMBeanInfoAssembler.java
  49. 1
      org.springframework.context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java
  50. 4
      org.springframework.context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java
  51. 2
      org.springframework.context/src/main/java/org/springframework/jmx/support/NotificationListenerHolder.java
  52. 1
      org.springframework.context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java
  53. 1
      org.springframework.context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java
  54. 1
      org.springframework.context/src/main/java/org/springframework/jndi/JndiTemplateEditor.java
  55. 2
      org.springframework.context/src/main/java/org/springframework/remoting/rmi/CodebaseAwareObjectInputStream.java
  56. 1
      org.springframework.context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java
  57. 1
      org.springframework.context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java
  58. 1
      org.springframework.context/src/main/java/org/springframework/remoting/rmi/RmiBasedExporter.java
  59. 2
      org.springframework.context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java
  60. 2
      org.springframework.context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java
  61. 1
      org.springframework.context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java
  62. 1
      org.springframework.context/src/main/java/org/springframework/remoting/support/RemoteInvocation.java
  63. 1
      org.springframework.context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java
  64. 1
      org.springframework.context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java
  65. 1
      org.springframework.context/src/main/java/org/springframework/scheduling/support/MethodInvokingRunnable.java
  66. 1
      org.springframework.context/src/main/java/org/springframework/scheduling/timer/DelegatingTimerTask.java
  67. 1
      org.springframework.context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java
  68. 1
      org.springframework.context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java
  69. 1
      org.springframework.context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java
  70. 2
      org.springframework.context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java
  71. 1
      org.springframework.context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java
  72. 1
      org.springframework.context/src/main/java/org/springframework/scripting/jruby/JRubyScriptFactory.java
  73. 2
      org.springframework.context/src/main/java/org/springframework/scripting/support/RefreshableScriptTargetSource.java
  74. 1
      org.springframework.context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java
  75. 2
      org.springframework.context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java
  76. 1
      org.springframework.context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java
  77. 4
      org.springframework.context/src/main/java/org/springframework/ui/ModelMap.java
  78. 10
      org.springframework.context/src/main/java/org/springframework/validation/AbstractBindingResult.java
  79. 1
      org.springframework.context/src/main/java/org/springframework/validation/AbstractErrors.java
  80. 5
      org.springframework.context/src/main/java/org/springframework/validation/AbstractPropertyBindingResult.java
  81. 2
      org.springframework.context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java
  82. 4
      org.springframework.context/src/main/java/org/springframework/validation/BindException.java
  83. 1
      org.springframework.context/src/main/java/org/springframework/validation/DataBinder.java
  84. 2
      org.springframework.context/src/main/java/org/springframework/validation/DirectFieldBindingResult.java
  85. 3
      org.springframework.context/src/main/java/org/springframework/validation/FieldError.java
  86. 2
      org.springframework.context/src/main/java/org/springframework/validation/MapBindingResult.java
  87. 3
      org.springframework.context/src/main/java/org/springframework/validation/ObjectError.java
  88. 2
      org.springframework.context/src/main/java/org/springframework/validation/support/BindingAwareModelMap.java

3
org.springframework.context/src/main/java/org/springframework/context/access/ContextSingletonBeanFactoryLocator.java

@ -128,6 +128,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca @@ -128,6 +128,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca
* <p>The default implementation simply builds a
* {@link org.springframework.context.support.ClassPathXmlApplicationContext}.
*/
@Override
protected BeanFactory createDefinition(String resourceLocation, String factoryKey) {
return new ClassPathXmlApplicationContext(new String[] {resourceLocation}, false);
}
@ -136,6 +137,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca @@ -136,6 +137,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca
* Overrides the default method to refresh the ApplicationContext, invoking
* {@link ConfigurableApplicationContext#refresh ConfigurableApplicationContext.refresh()}.
*/
@Override
protected void initializeDefinition(BeanFactory groupDef) {
if (groupDef instanceof ConfigurableApplicationContext) {
((ConfigurableApplicationContext) groupDef).refresh();
@ -146,6 +148,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca @@ -146,6 +148,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca
* Overrides the default method to operate on an ApplicationContext, invoking
* {@link ConfigurableApplicationContext#refresh ConfigurableApplicationContext.close()}.
*/
@Override
protected void destroyDefinition(BeanFactory groupDef, String selector) {
if (groupDef instanceof ConfigurableApplicationContext) {
if (logger.isTraceEnabled()) {

5
org.springframework.context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java

@ -271,6 +271,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean @@ -271,6 +271,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
}
@Override
public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class beanType, String beanName) {
super.postProcessMergedBeanDefinition(beanDefinition, beanType, beanName);
if (beanType != null) {
@ -508,6 +509,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean @@ -508,6 +509,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
super(member, pd);
}
@Override
protected void initAnnotation(AnnotatedElement ae) {
Resource resource = ae.getAnnotation(Resource.class);
String resourceName = resource.name();
@ -553,6 +555,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean @@ -553,6 +555,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
super(member, pd);
}
@Override
protected void initAnnotation(AnnotatedElement ae) {
WebServiceRef resource = ae.getAnnotation(WebServiceRef.class);
String resourceName = resource.name();
@ -639,6 +642,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean @@ -639,6 +642,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
super(member, pd);
}
@Override
protected void initAnnotation(AnnotatedElement ae) {
EJB resource = ae.getAnnotation(EJB.class);
String resourceBeanName = resource.beanName();
@ -704,6 +708,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean @@ -704,6 +708,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
this.lookupType = lookupType;
}
@Override
public Class getDependencyType() {
return this.lookupType;
}

2
org.springframework.context/src/main/java/org/springframework/context/config/AbstractPropertyLoadingBeanDefinitionParser.java

@ -32,10 +32,12 @@ import org.springframework.util.StringUtils; @@ -32,10 +32,12 @@ import org.springframework.util.StringUtils;
*/
abstract class AbstractPropertyLoadingBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
@Override
protected boolean shouldGenerateId() {
return true;
}
@Override
protected void doParse(Element element, BeanDefinitionBuilder builder) {
String location = element.getAttribute("location");
if (StringUtils.hasLength(location)) {

3
org.springframework.context/src/main/java/org/springframework/context/config/LoadTimeWeaverBeanDefinitionParser.java

@ -48,6 +48,7 @@ class LoadTimeWeaverBeanDefinitionParser extends AbstractSingleBeanDefinitionPar @@ -48,6 +48,7 @@ class LoadTimeWeaverBeanDefinitionParser extends AbstractSingleBeanDefinitionPar
"org.springframework.context.weaving.AspectJWeavingEnabler";
@Override
protected String getBeanClassName(Element element) {
if (element.hasAttribute(WEAVER_CLASS_ATTRIBUTE)) {
return element.getAttribute(WEAVER_CLASS_ATTRIBUTE);
@ -55,10 +56,12 @@ class LoadTimeWeaverBeanDefinitionParser extends AbstractSingleBeanDefinitionPar @@ -55,10 +56,12 @@ class LoadTimeWeaverBeanDefinitionParser extends AbstractSingleBeanDefinitionPar
return DEFAULT_LOAD_TIME_WEAVER_CLASS_NAME;
}
@Override
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) {
return ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME;
}
@Override
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
builder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);

2
org.springframework.context/src/main/java/org/springframework/context/config/MBeanExportBeanDefinitionParser.java

@ -54,10 +54,12 @@ class MBeanExportBeanDefinitionParser extends AbstractBeanDefinitionParser { @@ -54,10 +54,12 @@ class MBeanExportBeanDefinitionParser extends AbstractBeanDefinitionParser {
private static final String REGISTRATION_REPLACE_EXISTING = "replaceExisting";
@Override
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) {
return MBEAN_EXPORTER_BEAN_NAME;
}
@Override
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
String beanClassName = (JdkVersion.isAtLeastJava15() ?
"org.springframework.jmx.export.annotation.AnnotationMBeanExporter" :

2
org.springframework.context/src/main/java/org/springframework/context/config/MBeanServerBeanDefinitionParser.java

@ -55,11 +55,13 @@ class MBeanServerBeanDefinitionParser extends AbstractBeanDefinitionParser { @@ -55,11 +55,13 @@ class MBeanServerBeanDefinitionParser extends AbstractBeanDefinitionParser {
"com.ibm.websphere.management.AdminServiceFactory", MBeanServerBeanDefinitionParser.class.getClassLoader());
@Override
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) {
String id = element.getAttribute(ID_ATTRIBUTE);
return (StringUtils.hasText(id) ? id : MBEAN_SERVER_BEAN_NAME);
}
@Override
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
String agentId = element.getAttribute(AGENT_ID_ATTRIBUTE);
if (StringUtils.hasText(agentId)) {

1
org.springframework.context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java

@ -28,6 +28,7 @@ import org.springframework.beans.factory.config.PropertyOverrideConfigurer; @@ -28,6 +28,7 @@ import org.springframework.beans.factory.config.PropertyOverrideConfigurer;
*/
class PropertyOverrideBeanDefinitionParser extends AbstractPropertyLoadingBeanDefinitionParser {
@Override
protected Class getBeanClass(Element element) {
return PropertyOverrideConfigurer.class;
}

1
org.springframework.context/src/main/java/org/springframework/context/config/PropertyPlaceholderBeanDefinitionParser.java

@ -28,6 +28,7 @@ import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; @@ -28,6 +28,7 @@ import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
*/
class PropertyPlaceholderBeanDefinitionParser extends AbstractPropertyLoadingBeanDefinitionParser {
@Override
protected Class getBeanClass(Element element) {
return PropertyPlaceholderConfigurer.class;
}

1
org.springframework.context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java

@ -46,6 +46,7 @@ public class SimpleLocaleContext implements LocaleContext { @@ -46,6 +46,7 @@ public class SimpleLocaleContext implements LocaleContext {
return this.locale;
}
@Override
public String toString() {
return this.locale.toString();
}

2
org.springframework.context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java

@ -760,6 +760,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader @@ -760,6 +760,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
if (this.shutdownHook == null) {
// No shutdown hook registered yet.
this.shutdownHook = new Thread() {
@Override
public void run() {
doClose();
}
@ -1153,6 +1154,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader @@ -1153,6 +1154,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Return information about this context.
*/
@Override
public String toString() {
StringBuffer sb = new StringBuffer(getId());
sb.append(": display name [").append(getDisplayName());

2
org.springframework.context/src/main/java/org/springframework/context/support/AbstractMessageSource.java

@ -272,6 +272,7 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme @@ -272,6 +272,7 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
* @return the rendered default message (with resolved arguments)
* @see #formatMessage(String, Object[], java.util.Locale)
*/
@Override
protected String renderDefaultMessage(String defaultMessage, Object[] args, Locale locale) {
return formatMessage(defaultMessage, args, locale);
}
@ -285,6 +286,7 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme @@ -285,6 +286,7 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
* @param locale the locale to resolve through
* @return an array of arguments with any MessageSourceResolvables resolved
*/
@Override
protected Object[] resolveArguments(Object[] args, Locale locale) {
if (args == null) {
return new Object[0];

3
org.springframework.context/src/main/java/org/springframework/context/support/AbstractRefreshableApplicationContext.java

@ -112,6 +112,7 @@ public abstract class AbstractRefreshableApplicationContext extends AbstractAppl @@ -112,6 +112,7 @@ public abstract class AbstractRefreshableApplicationContext extends AbstractAppl
* bean factory, shutting down the previous bean factory (if any) and
* initializing a fresh bean factory for the next phase of the context's lifecycle.
*/
@Override
protected final void refreshBeanFactory() throws BeansException {
if (hasBeanFactory()) {
destroyBeans();
@ -131,6 +132,7 @@ public abstract class AbstractRefreshableApplicationContext extends AbstractAppl @@ -131,6 +132,7 @@ public abstract class AbstractRefreshableApplicationContext extends AbstractAppl
}
}
@Override
protected final void closeBeanFactory() {
synchronized (this.beanFactoryMonitor) {
this.beanFactory = null;
@ -147,6 +149,7 @@ public abstract class AbstractRefreshableApplicationContext extends AbstractAppl @@ -147,6 +149,7 @@ public abstract class AbstractRefreshableApplicationContext extends AbstractAppl
}
}
@Override
public final ConfigurableListableBeanFactory getBeanFactory() {
synchronized (this.beanFactoryMonitor) {
if (this.beanFactory == null) {

1
org.springframework.context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java

@ -124,6 +124,7 @@ public abstract class AbstractRefreshableConfigApplicationContext extends Abstra @@ -124,6 +124,7 @@ public abstract class AbstractRefreshableConfigApplicationContext extends Abstra
}
@Override
public void setId(String id) {
super.setId(id);
this.setIdCalled = true;

1
org.springframework.context/src/main/java/org/springframework/context/support/AbstractXmlApplicationContext.java

@ -65,6 +65,7 @@ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableC @@ -65,6 +65,7 @@ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableC
* @see #initBeanDefinitionReader
* @see #loadBeanDefinitions
*/
@Override
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException {
// Create a new XmlBeanDefinitionReader for the given BeanFactory.
XmlBeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);

1
org.springframework.context/src/main/java/org/springframework/context/support/ClassPathXmlApplicationContext.java

@ -198,6 +198,7 @@ public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContex @@ -198,6 +198,7 @@ public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContex
}
@Override
protected Resource[] getConfigResources() {
return this.configResources;
}

3
org.springframework.context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java

@ -58,6 +58,7 @@ class ContextTypeMatchClassLoader extends DecoratingClassLoader implements Smart @@ -58,6 +58,7 @@ class ContextTypeMatchClassLoader extends DecoratingClassLoader implements Smart
super(parent);
}
@Override
public Class loadClass(String name) throws ClassNotFoundException {
return new ContextOverridingClassLoader(getParent()).loadClass(name);
}
@ -77,6 +78,7 @@ class ContextTypeMatchClassLoader extends DecoratingClassLoader implements Smart @@ -77,6 +78,7 @@ class ContextTypeMatchClassLoader extends DecoratingClassLoader implements Smart
super(parent);
}
@Override
protected boolean isEligibleForOverriding(String className) {
if (isExcluded(className) || ContextTypeMatchClassLoader.this.isExcluded(className)) {
return false;
@ -92,6 +94,7 @@ class ContextTypeMatchClassLoader extends DecoratingClassLoader implements Smart @@ -92,6 +94,7 @@ class ContextTypeMatchClassLoader extends DecoratingClassLoader implements Smart
return true;
}
@Override
protected Class loadClassForOverriding(String name) throws ClassNotFoundException {
byte[] bytes = (byte[]) bytesCache.get(name);
if (bytes == null) {

3
org.springframework.context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java

@ -134,11 +134,13 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable, @@ -134,11 +134,13 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable,
* resolvable content through <code>resolvableToString()</code>.
* @see #resolvableToString()
*/
@Override
public String toString() {
return getClass().getName() + ": " + resolvableToString();
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
@ -152,6 +154,7 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable, @@ -152,6 +154,7 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable,
ObjectUtils.nullSafeEquals(getDefaultMessage(), otherResolvable.getDefaultMessage());
}
@Override
public int hashCode() {
int hashCode = ObjectUtils.nullSafeHashCode(getCodes());
hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(getArguments());

1
org.springframework.context/src/main/java/org/springframework/context/support/FileSystemXmlApplicationContext.java

@ -151,6 +151,7 @@ public class FileSystemXmlApplicationContext extends AbstractXmlApplicationConte @@ -151,6 +151,7 @@ public class FileSystemXmlApplicationContext extends AbstractXmlApplicationConte
* @return Resource handle
* @see org.springframework.web.context.support.XmlWebApplicationContext#getResourceByPath
*/
@Override
protected Resource getResourceByPath(String path) {
if (path != null && path.startsWith("/")) {
path = path.substring(1);

6
org.springframework.context/src/main/java/org/springframework/context/support/GenericApplicationContext.java

@ -139,6 +139,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem @@ -139,6 +139,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
* the parent of the internal BeanFactory accordingly.
* @see org.springframework.beans.factory.config.ConfigurableBeanFactory#setParentBeanFactory
*/
@Override
public void setParent(ApplicationContext parent) {
super.setParent(parent);
this.beanFactory.setParentBeanFactory(getInternalParentBeanFactory());
@ -172,6 +173,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem @@ -172,6 +173,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
* falling back to the default superclass behavior else.
* @see #setResourceLoader
*/
@Override
public Resource getResource(String location) {
if (this.resourceLoader != null) {
return this.resourceLoader.getResource(location);
@ -185,6 +187,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem @@ -185,6 +187,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
* default superclass behavior else.
* @see #setResourceLoader
*/
@Override
public Resource[] getResources(String locationPattern) throws IOException {
if (this.resourceLoader instanceof ResourcePatternResolver) {
return ((ResourcePatternResolver) this.resourceLoader).getResources(locationPattern);
@ -202,6 +205,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem @@ -202,6 +205,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
* to register beans through our public methods (or the BeanFactory's).
* @see #registerBeanDefinition
*/
@Override
protected final void refreshBeanFactory() throws IllegalStateException {
if (this.refreshed) {
throw new IllegalStateException(
@ -214,6 +218,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem @@ -214,6 +218,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
* Do nothing: We hold a single internal BeanFactory that will never
* get released.
*/
@Override
protected final void closeBeanFactory() {
}
@ -221,6 +226,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem @@ -221,6 +226,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
* Return the single internal BeanFactory held by this context
* (as ConfigurableListableBeanFactory).
*/
@Override
public final ConfigurableListableBeanFactory getBeanFactory() {
return this.beanFactory;
}

3
org.springframework.context/src/main/java/org/springframework/context/support/MessageSourceResourceBundle.java

@ -69,6 +69,7 @@ public class MessageSourceResourceBundle extends ResourceBundle { @@ -69,6 +69,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
* This implementation resolves the code in the MessageSource.
* Returns <code>null</code> if the message could not be resolved.
*/
@Override
protected Object handleGetObject(String code) {
try {
return this.messageSource.getMessage(code, null, this.locale);
@ -82,6 +83,7 @@ public class MessageSourceResourceBundle extends ResourceBundle { @@ -82,6 +83,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
* This implementation returns <code>null</code>, as a MessageSource does
* not allow for enumerating the defined message codes.
*/
@Override
public Enumeration getKeys() {
return null;
}
@ -90,6 +92,7 @@ public class MessageSourceResourceBundle extends ResourceBundle { @@ -90,6 +92,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
* This implementation exposes the specified Locale for introspection
* through the standard <code>ResourceBundle.getLocale()</code> method.
*/
@Override
public Locale getLocale() {
return this.locale;
}

3
org.springframework.context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java

@ -261,6 +261,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource @@ -261,6 +261,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
* Resolves the given message code as key in the retrieved bundle files,
* returning the value found in the bundle as-is (without MessageFormat parsing).
*/
@Override
protected String resolveCodeWithoutArguments(String code, Locale locale) {
if (this.cacheMillis < 0) {
PropertiesHolder propHolder = getMergedProperties(locale);
@ -289,6 +290,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource @@ -289,6 +290,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
* Resolves the given message code as key in the retrieved bundle files,
* using a cached MessageFormat instance per message code.
*/
@Override
protected MessageFormat resolveCode(String code, Locale locale) {
if (this.cacheMillis < 0) {
PropertiesHolder propHolder = getMergedProperties(locale);
@ -580,6 +582,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource @@ -580,6 +582,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
}
@Override
public String toString() {
return getClass().getName() + ": basenames=[" + StringUtils.arrayToCommaDelimitedString(this.basenames) + "]";
}

3
org.springframework.context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java

@ -161,6 +161,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement @@ -161,6 +161,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
* Resolves the given message code as key in the registered resource bundles,
* returning the value found in the bundle as-is (without MessageFormat parsing).
*/
@Override
protected String resolveCodeWithoutArguments(String code, Locale locale) {
String result = null;
for (int i = 0; result == null && i < this.basenames.length; i++) {
@ -176,6 +177,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement @@ -176,6 +177,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
* Resolves the given message code as key in the registered resource bundles,
* using a cached MessageFormat instance per message code.
*/
@Override
protected MessageFormat resolveCode(String code, Locale locale) {
MessageFormat messageFormat = null;
for (int i = 0; messageFormat == null && i < this.basenames.length; i++) {
@ -298,6 +300,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement @@ -298,6 +300,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
/**
* Show the configuration of this MessageSource.
*/
@Override
public String toString() {
return getClass().getName() + ": basenames=[" +
StringUtils.arrayToCommaDelimitedString(this.basenames) + "]";

2
org.springframework.context/src/main/java/org/springframework/context/support/ResourceMapFactoryBean.java

@ -66,6 +66,7 @@ public class ResourceMapFactoryBean extends PropertiesFactoryBean implements Res @@ -66,6 +66,7 @@ public class ResourceMapFactoryBean extends PropertiesFactoryBean implements Res
}
@Override
public Class getObjectType() {
return Map.class;
}
@ -73,6 +74,7 @@ public class ResourceMapFactoryBean extends PropertiesFactoryBean implements Res @@ -73,6 +74,7 @@ public class ResourceMapFactoryBean extends PropertiesFactoryBean implements Res
/**
* Create the Map instance, populated with keys and Resource values.
*/
@Override
protected Object createInstance() throws IOException {
Map resourceMap = new HashMap();
Properties props = mergeProperties();

2
org.springframework.context/src/main/java/org/springframework/context/support/StaticMessageSource.java

@ -40,6 +40,7 @@ public class StaticMessageSource extends AbstractMessageSource { @@ -40,6 +40,7 @@ public class StaticMessageSource extends AbstractMessageSource {
private final Map messages = new HashMap();
@Override
protected MessageFormat resolveCode(String code, Locale locale) {
return (MessageFormat) this.messages.get(code + "_" + locale.toString());
}
@ -75,6 +76,7 @@ public class StaticMessageSource extends AbstractMessageSource { @@ -75,6 +76,7 @@ public class StaticMessageSource extends AbstractMessageSource {
}
@Override
public String toString() {
return getClass().getName() + ": " + this.messages;
}

4
org.springframework.context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java

@ -83,6 +83,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI @@ -83,6 +83,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI
this.refreshHomeOnConnectFailure = refreshHomeOnConnectFailure;
}
@Override
protected boolean isHomeRefreshable() {
return this.refreshHomeOnConnectFailure;
}
@ -94,6 +95,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI @@ -94,6 +95,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI
* @see #setHomeInterface
* @see javax.rmi.PortableRemoteObject#narrow
*/
@Override
protected Object lookup() throws NamingException {
Object homeObject = super.lookup();
if (this.homeInterface != null) {
@ -111,6 +113,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI @@ -111,6 +113,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI
/**
* Check for EJB3-style home object that serves as EJB component directly.
*/
@Override
protected Method getCreateMethod(Object home) throws EjbAccessException {
if (this.homeAsComponent) {
return null;
@ -132,6 +135,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI @@ -132,6 +135,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI
* @see #doInvoke
* @see #refreshAndRetry
*/
@Override
public Object invokeInContext(MethodInvocation invocation) throws Throwable {
try {
return doInvoke(invocation);

1
org.springframework.context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java

@ -101,6 +101,7 @@ public abstract class AbstractSlsbInvokerInterceptor extends JndiObjectLocator @@ -101,6 +101,7 @@ public abstract class AbstractSlsbInvokerInterceptor extends JndiObjectLocator
* @see #setLookupHomeOnStartup
* @see #refreshHome
*/
@Override
public void afterPropertiesSet() throws NamingException {
super.afterPropertiesSet();
if (this.lookupHomeOnStartup) {

2
org.springframework.context/src/main/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptor.java

@ -60,6 +60,7 @@ public class LocalSlsbInvokerInterceptor extends AbstractSlsbInvokerInterceptor @@ -60,6 +60,7 @@ public class LocalSlsbInvokerInterceptor extends AbstractSlsbInvokerInterceptor
* {@link #releaseSessionBeanInstance} to change EJB instance creation,
* for example to hold a single shared EJB instance.
*/
@Override
public Object invokeInContext(MethodInvocation invocation) throws Throwable {
Object ejb = null;
try {
@ -104,6 +105,7 @@ public class LocalSlsbInvokerInterceptor extends AbstractSlsbInvokerInterceptor @@ -104,6 +105,7 @@ public class LocalSlsbInvokerInterceptor extends AbstractSlsbInvokerInterceptor
/**
* Check for EJB3-style home object that serves as EJB component directly.
*/
@Override
protected Method getCreateMethod(Object home) throws EjbAccessException {
if (this.homeAsComponent) {
return null;

1
org.springframework.context/src/main/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBean.java

@ -81,6 +81,7 @@ public class LocalStatelessSessionProxyFactoryBean extends LocalSlsbInvokerInter @@ -81,6 +81,7 @@ public class LocalStatelessSessionProxyFactoryBean extends LocalSlsbInvokerInter
this.beanClassLoader = classLoader;
}
@Override
public void afterPropertiesSet() throws NamingException {
super.afterPropertiesSet();
if (this.businessInterface == null) {

2
org.springframework.context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java

@ -91,6 +91,7 @@ public class SimpleRemoteSlsbInvokerInterceptor extends AbstractRemoteSlsbInvoke @@ -91,6 +91,7 @@ public class SimpleRemoteSlsbInvokerInterceptor extends AbstractRemoteSlsbInvoke
* {@link #releaseSessionBeanInstance} to change EJB instance creation,
* for example to hold a single shared EJB component instance.
*/
@Override
protected Object doInvoke(MethodInvocation invocation) throws Throwable {
Object ejb = null;
try {
@ -157,6 +158,7 @@ public class SimpleRemoteSlsbInvokerInterceptor extends AbstractRemoteSlsbInvoke @@ -157,6 +158,7 @@ public class SimpleRemoteSlsbInvokerInterceptor extends AbstractRemoteSlsbInvoke
/**
* Reset the cached session bean instance, if necessary.
*/
@Override
protected void refreshHome() throws NamingException {
super.refreshHome();
if (this.cacheSessionBean) {

1
org.springframework.context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java

@ -95,6 +95,7 @@ public class SimpleRemoteStatelessSessionProxyFactoryBean extends SimpleRemoteSl @@ -95,6 +95,7 @@ public class SimpleRemoteStatelessSessionProxyFactoryBean extends SimpleRemoteSl
this.beanClassLoader = classLoader;
}
@Override
public void afterPropertiesSet() throws NamingException {
super.afterPropertiesSet();
if (this.businessInterface == null) {

2
org.springframework.context/src/main/java/org/springframework/ejb/config/AbstractJndiLocatingBeanDefinitionParser.java

@ -42,10 +42,12 @@ abstract class AbstractJndiLocatingBeanDefinitionParser extends AbstractSimpleBe @@ -42,10 +42,12 @@ abstract class AbstractJndiLocatingBeanDefinitionParser extends AbstractSimpleBe
public static final String JNDI_ENVIRONMENT = "jndiEnvironment";
@Override
protected boolean isEligibleAttribute(String attributeName) {
return (super.isEligibleAttribute(attributeName) && !ENVIRONMENT_REF.equals(attributeName));
}
@Override
protected void postProcess(BeanDefinitionBuilder definitionBuilder, Element element) {
Object envValue = DomUtils.getChildElementValueByTagName(element, ENVIRONMENT);
if (envValue != null) {

3
org.springframework.context/src/main/java/org/springframework/ejb/config/JndiLookupBeanDefinitionParser.java

@ -42,15 +42,18 @@ class JndiLookupBeanDefinitionParser extends AbstractJndiLocatingBeanDefinitionP @@ -42,15 +42,18 @@ class JndiLookupBeanDefinitionParser extends AbstractJndiLocatingBeanDefinitionP
public static final String DEFAULT_OBJECT = "defaultObject";
@Override
protected Class getBeanClass(Element element) {
return JndiObjectFactoryBean.class;
}
@Override
protected boolean isEligibleAttribute(String attributeName) {
return (super.isEligibleAttribute(attributeName) &&
!DEFAULT_VALUE.equals(attributeName) && !DEFAULT_REF.equals(attributeName));
}
@Override
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
super.doParse(element, parserContext, builder);

1
org.springframework.context/src/main/java/org/springframework/ejb/config/LocalStatelessSessionBeanDefinitionParser.java

@ -31,6 +31,7 @@ import org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean; @@ -31,6 +31,7 @@ import org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean;
*/
class LocalStatelessSessionBeanDefinitionParser extends AbstractJndiLocatingBeanDefinitionParser {
@Override
protected String getBeanClassName(Element element) {
return "org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean";
}

1
org.springframework.context/src/main/java/org/springframework/ejb/config/RemoteStatelessSessionBeanDefinitionParser.java

@ -31,6 +31,7 @@ import org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBe @@ -31,6 +31,7 @@ import org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBe
*/
class RemoteStatelessSessionBeanDefinitionParser extends AbstractJndiLocatingBeanDefinitionParser {
@Override
protected String getBeanClassName(Element element) {
return "org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean";
}

2
org.springframework.context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java

@ -54,6 +54,7 @@ public abstract class AbstractStatefulSessionBean extends AbstractSessionBean { @@ -54,6 +54,7 @@ public abstract class AbstractStatefulSessionBean extends AbstractSessionBean {
* removed via a call to <code>unloadBeanFactory()</code> from
* the <code>ejbPassivate()</code> implementation.
*/
@Override
protected void loadBeanFactory() throws BeansException {
super.loadBeanFactory();
}
@ -66,6 +67,7 @@ public abstract class AbstractStatefulSessionBean extends AbstractSessionBean { @@ -66,6 +67,7 @@ public abstract class AbstractStatefulSessionBean extends AbstractSessionBean {
* must also be called from <code>ejbPassivate()</code>, with a corresponding
* call to <code>loadBeanFactory()</code> from <code>ejbActivate()</code>.
*/
@Override
protected void unloadBeanFactory() throws FatalBeanException {
super.unloadBeanFactory();
}

1
org.springframework.context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java

@ -182,6 +182,7 @@ public class InstrumentationLoadTimeWeaver implements LoadTimeWeaver { @@ -182,6 +182,7 @@ public class InstrumentationLoadTimeWeaver implements LoadTimeWeaver {
loader, className, classBeingRedefined, protectionDomain, classfileBuffer);
}
@Override
public String toString() {
return "FilteringClassFileTransformer for: " + this.targetTransformer.toString();
}

5
org.springframework.context/src/main/java/org/springframework/instrument/classloading/ShadowingClassLoader.java

@ -93,6 +93,7 @@ public class ShadowingClassLoader extends DecoratingClassLoader { @@ -93,6 +93,7 @@ public class ShadowingClassLoader extends DecoratingClassLoader {
}
@Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
if (shouldShadow(name)) {
Class cls = this.classCache.get(name);
@ -134,6 +135,7 @@ public class ShadowingClassLoader extends DecoratingClassLoader { @@ -134,6 +135,7 @@ public class ShadowingClassLoader extends DecoratingClassLoader {
* @return whether the specified class is excluded
* @deprecated in favor of {@link #isEligibleForShadowing}
*/
@Deprecated
protected boolean isClassNameExcludedFromShadowing(String className) {
return false;
}
@ -180,14 +182,17 @@ public class ShadowingClassLoader extends DecoratingClassLoader { @@ -180,14 +182,17 @@ public class ShadowingClassLoader extends DecoratingClassLoader {
}
@Override
public URL getResource(String name) {
return this.enclosingClassLoader.getResource(name);
}
@Override
public InputStream getResourceAsStream(String name) {
return this.enclosingClassLoader.getResourceAsStream(name);
}
@Override
public Enumeration<URL> getResources(String name) throws IOException {
return this.enclosingClassLoader.getResources(name);
}

2
org.springframework.context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java

@ -584,6 +584,7 @@ public class MBeanClientInterceptor @@ -584,6 +584,7 @@ public class MBeanClientInterceptor
this.parameterTypes = (parameterTypes != null ? parameterTypes : new Class[0]);
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
@ -592,6 +593,7 @@ public class MBeanClientInterceptor @@ -592,6 +593,7 @@ public class MBeanClientInterceptor
return (this.name.equals(otherKey.name) && Arrays.equals(this.parameterTypes, otherKey.parameterTypes));
}
@Override
public int hashCode() {
return this.name.hashCode();
}

2
org.springframework.context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java

@ -69,6 +69,7 @@ public class MBeanProxyFactoryBean extends MBeanClientInterceptor @@ -69,6 +69,7 @@ public class MBeanProxyFactoryBean extends MBeanClientInterceptor
this.proxyInterface = proxyInterface;
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
this.beanClassLoader = classLoader;
}
@ -77,6 +78,7 @@ public class MBeanProxyFactoryBean extends MBeanClientInterceptor @@ -77,6 +78,7 @@ public class MBeanProxyFactoryBean extends MBeanClientInterceptor
* Checks that the <code>proxyInterface</code> has been specified and then
* generates the proxy for the target MBean.
*/
@Override
public void afterPropertiesSet() throws MBeanServerNotFoundException, MBeanInfoRetrievalException {
super.afterPropertiesSet();

3
org.springframework.context/src/main/java/org/springframework/jmx/export/MBeanExporter.java

@ -1001,6 +1001,7 @@ public class MBeanExporter extends MBeanRegistrationSupport @@ -1001,6 +1001,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
* callback.
* @param objectName the <code>ObjectName</code> of the registered MBean
*/
@Override
protected void onRegister(ObjectName objectName) {
notifyListenersOfRegistration(objectName);
}
@ -1015,6 +1016,7 @@ public class MBeanExporter extends MBeanRegistrationSupport @@ -1015,6 +1016,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
* callback.
* @param objectName the <code>ObjectName</code> of the unregistered MBean
*/
@Override
protected void onUnregister(ObjectName objectName) {
notifyListenersOfUnregistration(objectName);
}
@ -1083,6 +1085,7 @@ public class MBeanExporter extends MBeanRegistrationSupport @@ -1083,6 +1085,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
this.objectName = objectName;
}
@Override
protected void postProcessTargetObject(Object targetObject) {
injectNotificationPublisherIfNecessary(targetObject, this.modelMBean, this.objectName);
}

6
org.springframework.context/src/main/java/org/springframework/jmx/export/SpringModelMBean.java

@ -66,6 +66,7 @@ public class SpringModelMBean extends RequiredModelMBean { @@ -66,6 +66,7 @@ public class SpringModelMBean extends RequiredModelMBean {
/**
* Sets managed resource to expose and stores its {@link ClassLoader}.
*/
@Override
public void setManagedResource(Object managedResource, String managedResourceType)
throws MBeanException, InstanceNotFoundException, InvalidTargetObjectTypeException {
@ -79,6 +80,7 @@ public class SpringModelMBean extends RequiredModelMBean { @@ -79,6 +80,7 @@ public class SpringModelMBean extends RequiredModelMBean {
* managed resources {@link ClassLoader} before allowing the invocation to occur.
* @see javax.management.modelmbean.ModelMBean#invoke
*/
@Override
public Object invoke(String opName, Object[] opArgs, String[] sig)
throws MBeanException, ReflectionException {
@ -97,6 +99,7 @@ public class SpringModelMBean extends RequiredModelMBean { @@ -97,6 +99,7 @@ public class SpringModelMBean extends RequiredModelMBean {
* managed resources {@link ClassLoader} before allowing the invocation to occur.
* @see javax.management.modelmbean.ModelMBean#getAttribute
*/
@Override
public Object getAttribute(String attrName)
throws AttributeNotFoundException, MBeanException, ReflectionException {
@ -115,6 +118,7 @@ public class SpringModelMBean extends RequiredModelMBean { @@ -115,6 +118,7 @@ public class SpringModelMBean extends RequiredModelMBean {
* managed resources {@link ClassLoader} before allowing the invocation to occur.
* @see javax.management.modelmbean.ModelMBean#getAttributes
*/
@Override
public AttributeList getAttributes(String[] attrNames) {
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
try {
@ -131,6 +135,7 @@ public class SpringModelMBean extends RequiredModelMBean { @@ -131,6 +135,7 @@ public class SpringModelMBean extends RequiredModelMBean {
* managed resources {@link ClassLoader} before allowing the invocation to occur.
* @see javax.management.modelmbean.ModelMBean#setAttribute
*/
@Override
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException {
@ -149,6 +154,7 @@ public class SpringModelMBean extends RequiredModelMBean { @@ -149,6 +154,7 @@ public class SpringModelMBean extends RequiredModelMBean {
* managed resources {@link ClassLoader} before allowing the invocation to occur.
* @see javax.management.modelmbean.ModelMBean#setAttributes
*/
@Override
public AttributeList setAttributes(AttributeList attributes) {
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
try {

1
org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/AbstractConfigurableMBeanInfoAssembler.java

@ -65,6 +65,7 @@ public abstract class AbstractConfigurableMBeanInfoAssembler extends AbstractRef @@ -65,6 +65,7 @@ public abstract class AbstractConfigurableMBeanInfoAssembler extends AbstractRef
}
@Override
protected ModelMBeanNotificationInfo[] getNotificationInfo(Object managedBean, String beanKey) {
ModelMBeanNotificationInfo[] result = null;

3
org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java

@ -249,6 +249,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean @@ -249,6 +249,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* @throws JMException in case of errors
* @see #populateAttributeDescriptor
*/
@Override
protected ModelMBeanAttributeInfo[] getAttributeInfo(Object managedBean, String beanKey) throws JMException {
PropertyDescriptor[] props = BeanUtils.getPropertyDescriptors(getClassToExpose(managedBean));
List infos = new ArrayList();
@ -302,6 +303,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean @@ -302,6 +303,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* @return the operation metadata
* @see #populateOperationDescriptor
*/
@Override
protected ModelMBeanOperationInfo[] getOperationInfo(Object managedBean, String beanKey) {
Method[] methods = getClassToExpose(managedBean).getMethods();
List infos = new ArrayList();
@ -478,6 +480,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean @@ -478,6 +480,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* @see #setDefaultCurrencyTimeLimit(Integer)
* @see #applyDefaultCurrencyTimeLimit(javax.management.Descriptor)
*/
@Override
protected void populateMBeanDescriptor(Descriptor descriptor, Object managedBean, String beanKey) {
applyDefaultCurrencyTimeLimit(descriptor);
}

3
org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java

@ -165,6 +165,7 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI @@ -165,6 +165,7 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
* @return <code>true</code> if the <code>Method</code> is declared in one of the
* configured interfaces, otherwise <code>false</code>.
*/
@Override
protected boolean includeReadAttribute(Method method, String beanKey) {
return isPublicInInterface(method, beanKey);
}
@ -178,6 +179,7 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI @@ -178,6 +179,7 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
* @return <code>true</code> if the <code>Method</code> is declared in one of the
* configured interfaces, otherwise <code>false</code>.
*/
@Override
protected boolean includeWriteAttribute(Method method, String beanKey) {
return isPublicInInterface(method, beanKey);
}
@ -191,6 +193,7 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI @@ -191,6 +193,7 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
* @return <code>true</code> if the <code>Method</code> is declared in one of the
* configured interfaces, otherwise <code>false</code>.
*/
@Override
protected boolean includeOperation(Method method, String beanKey) {
return isPublicInInterface(method, beanKey);
}

12
org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java

@ -102,6 +102,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -102,6 +102,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* Throws an IllegalArgumentException if it encounters a JDK dynamic proxy.
* Metadata can only be read from target classes and CGLIB proxies!
*/
@Override
protected void checkManagedBean(Object managedBean) throws IllegalArgumentException {
if (AopUtils.isJdkDynamicProxy(managedBean)) {
throw new IllegalArgumentException(
@ -126,6 +127,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -126,6 +127,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* @param beanKey the key associated with the MBean in the beans map
* @return whether the method has the appropriate metadata
*/
@Override
protected boolean includeReadAttribute(Method method, String beanKey) {
return hasManagedAttribute(method);
}
@ -136,6 +138,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -136,6 +138,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* @param beanKey the key associated with the MBean in the beans map
* @return whether the method has the appropriate metadata
*/
@Override
protected boolean includeWriteAttribute(Method method, String beanKey) {
return hasManagedAttribute(method);
}
@ -146,6 +149,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -146,6 +149,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* @param beanKey the key associated with the MBean in the beans map
* @return whether the method has the appropriate metadata
*/
@Override
protected boolean includeOperation(Method method, String beanKey) {
PropertyDescriptor pd = BeanUtils.findPropertyForMethod(method);
if (pd != null) {
@ -176,6 +180,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -176,6 +180,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* Reads managed resource description from the source level metadata.
* Returns an empty <code>String</code> if no description can be found.
*/
@Override
protected String getDescription(Object managedBean, String beanKey) {
ManagedResource mr = this.attributeSource.getManagedResource(getClassToExpose(managedBean));
return (mr != null ? mr.getDescription() : "");
@ -186,6 +191,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -186,6 +191,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* descriptor. Attempts to create the description using metadata from either
* the getter or setter attributes, otherwise uses the property name.
*/
@Override
protected String getAttributeDescription(PropertyDescriptor propertyDescriptor, String beanKey) {
Method readMethod = propertyDescriptor.getReadMethod();
Method writeMethod = propertyDescriptor.getWriteMethod();
@ -208,6 +214,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -208,6 +214,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* Retrieves the description for the supplied <code>Method</code> from the
* metadata. Uses the method name is no description is present in the metadata.
*/
@Override
protected String getOperationDescription(Method method, String beanKey) {
PropertyDescriptor pd = BeanUtils.findPropertyForMethod(method);
if (pd != null) {
@ -231,6 +238,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -231,6 +238,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* attributes attached to a method. Returns an empty array of <code>MBeanParameterInfo</code>
* if no attributes are found.
*/
@Override
protected MBeanParameterInfo[] getOperationParameters(Method method, String beanKey) {
ManagedOperationParameter[] params = this.attributeSource.getManagedOperationParameters(method);
if (params == null || params.length == 0) {
@ -253,6 +261,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -253,6 +261,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* Reads the {@link ManagedNotification} metadata from the <code>Class</code> of the managed resource
* and generates and returns the corresponding {@link ModelMBeanNotificationInfo} metadata.
*/
@Override
protected ModelMBeanNotificationInfo[] getNotificationInfo(Object managedBean, String beanKey) {
ManagedNotification[] notificationAttributes =
this.attributeSource.getManagedNotifications(getClassToExpose(managedBean));
@ -273,6 +282,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -273,6 +282,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* <code>persistPolicy</code>, <code>persistPeriod</code>, <code>persistLocation</code>
* and <code>persistName</code> descriptor fields if they are present in the metadata.
*/
@Override
protected void populateMBeanDescriptor(Descriptor desc, Object managedBean, String beanKey) {
ManagedResource mr = this.attributeSource.getManagedResource(getClassToExpose(managedBean));
if (mr == null) {
@ -309,6 +319,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -309,6 +319,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* <code>default</code>, <code>persistPolicy</code> and <code>persistPeriod</code>
* descriptor fields if they are present in the metadata.
*/
@Override
protected void populateAttributeDescriptor(Descriptor desc, Method getter, Method setter, String beanKey) {
ManagedAttribute gma =
(getter == null) ? ManagedAttribute.EMPTY : this.attributeSource.getManagedAttribute(getter);
@ -335,6 +346,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem @@ -335,6 +346,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
* to the attribute descriptor. Specifically, adds the <code>currencyTimeLimit</code>
* descriptor field if it is present in the metadata.
*/
@Override
protected void populateOperationDescriptor(Descriptor desc, Method method, String beanKey) {
ManagedOperation mo = this.attributeSource.getManagedOperation(method);
if (mo != null) {

3
org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java

@ -89,14 +89,17 @@ public class MethodExclusionMBeanInfoAssembler extends AbstractConfigurableMBean @@ -89,14 +89,17 @@ public class MethodExclusionMBeanInfoAssembler extends AbstractConfigurableMBean
}
@Override
protected boolean includeReadAttribute(Method method, String beanKey) {
return isNotIgnored(method, beanKey);
}
@Override
protected boolean includeWriteAttribute(Method method, String beanKey) {
return isNotIgnored(method, beanKey);
}
@Override
protected boolean includeOperation(Method method, String beanKey) {
return isNotIgnored(method, beanKey);
}

3
org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssembler.java

@ -93,14 +93,17 @@ public class MethodNameBasedMBeanInfoAssembler extends AbstractConfigurableMBean @@ -93,14 +93,17 @@ public class MethodNameBasedMBeanInfoAssembler extends AbstractConfigurableMBean
}
@Override
protected boolean includeReadAttribute(Method method, String beanKey) {
return isMatch(method, beanKey);
}
@Override
protected boolean includeWriteAttribute(Method method, String beanKey) {
return isMatch(method, beanKey);
}
@Override
protected boolean includeOperation(Method method, String beanKey) {
return isMatch(method, beanKey);
}

3
org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/SimpleReflectiveMBeanInfoAssembler.java

@ -32,6 +32,7 @@ public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBea @@ -32,6 +32,7 @@ public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBea
/**
* Always returns <code>true</code>.
*/
@Override
protected boolean includeReadAttribute(Method method, String beanKey) {
return true;
}
@ -39,6 +40,7 @@ public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBea @@ -39,6 +40,7 @@ public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBea
/**
* Always returns <code>true</code>.
*/
@Override
protected boolean includeWriteAttribute(Method method, String beanKey) {
return true;
}
@ -46,6 +48,7 @@ public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBea @@ -46,6 +48,7 @@ public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBea
/**
* Always returns <code>true</code>.
*/
@Override
protected boolean includeOperation(Method method, String beanKey) {
return true;
}

1
org.springframework.context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java

@ -149,6 +149,7 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport @@ -149,6 +149,7 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport
if (this.threaded) {
// Start the connector server asynchronously (in a separate thread).
Thread connectorThread = new Thread() {
@Override
public void run() {
try {
connectorServer.start();

4
org.springframework.context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java

@ -174,10 +174,12 @@ public class MBeanServerConnectionFactoryBean @@ -174,10 +174,12 @@ public class MBeanServerConnectionFactoryBean
*/
private class JMXConnectorLazyInitTargetSource extends AbstractLazyCreationTargetSource {
@Override
protected Object createObject() throws Exception {
return JMXConnectorFactory.connect(serviceUrl, environment);
}
@Override
public Class getTargetClass() {
return JMXConnector.class;
}
@ -189,10 +191,12 @@ public class MBeanServerConnectionFactoryBean @@ -189,10 +191,12 @@ public class MBeanServerConnectionFactoryBean
*/
private class MBeanServerConnectionLazyInitTargetSource extends AbstractLazyCreationTargetSource {
@Override
protected Object createObject() throws Exception {
return connector.getMBeanServerConnection();
}
@Override
public Class getTargetClass() {
return MBeanServerConnection.class;
}

2
org.springframework.context/src/main/java/org/springframework/jmx/support/NotificationListenerHolder.java

@ -153,6 +153,7 @@ public class NotificationListenerHolder { @@ -153,6 +153,7 @@ public class NotificationListenerHolder {
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
@ -167,6 +168,7 @@ public class NotificationListenerHolder { @@ -167,6 +168,7 @@ public class NotificationListenerHolder {
ObjectUtils.nullSafeEquals(this.mappedObjectNames, otherNlh.mappedObjectNames));
}
@Override
public int hashCode() {
int hashCode = ObjectUtils.nullSafeHashCode(this.notificationListener);
hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.notificationFilter);

1
org.springframework.context/src/main/java/org/springframework/jndi/JndiObjectFactoryBean.java

@ -163,6 +163,7 @@ public class JndiObjectFactoryBean extends JndiObjectLocator implements FactoryB @@ -163,6 +163,7 @@ public class JndiObjectFactoryBean extends JndiObjectLocator implements FactoryB
/**
* Look up the JNDI object and store it.
*/
@Override
public void afterPropertiesSet() throws IllegalArgumentException, NamingException {
super.afterPropertiesSet();

1
org.springframework.context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java

@ -90,6 +90,7 @@ public class JndiObjectTargetSource extends JndiObjectLocator implements TargetS @@ -90,6 +90,7 @@ public class JndiObjectTargetSource extends JndiObjectLocator implements TargetS
this.cache = cache;
}
@Override
public void afterPropertiesSet() throws NamingException {
super.afterPropertiesSet();
if (this.lookupOnStartup) {

1
org.springframework.context/src/main/java/org/springframework/jndi/JndiTemplateEditor.java

@ -32,6 +32,7 @@ public class JndiTemplateEditor extends PropertyEditorSupport { @@ -32,6 +32,7 @@ public class JndiTemplateEditor extends PropertyEditorSupport {
private final PropertiesEditor propertiesEditor = new PropertiesEditor();
@Override
public void setAsText(String text) throws IllegalArgumentException {
if (text == null) {
throw new IllegalArgumentException("JndiTemplate cannot be created from null string");

2
org.springframework.context/src/main/java/org/springframework/remoting/rmi/CodebaseAwareObjectInputStream.java

@ -83,6 +83,7 @@ public class CodebaseAwareObjectInputStream extends ConfigurableObjectInputStrea @@ -83,6 +83,7 @@ public class CodebaseAwareObjectInputStream extends ConfigurableObjectInputStrea
}
@Override
protected Class resolveFallbackIfPossible(String className, ClassNotFoundException ex)
throws IOException, ClassNotFoundException {
@ -94,6 +95,7 @@ public class CodebaseAwareObjectInputStream extends ConfigurableObjectInputStrea @@ -94,6 +95,7 @@ public class CodebaseAwareObjectInputStream extends ConfigurableObjectInputStrea
return RMIClassLoader.loadClass(this.codebaseUrl, className);
}
@Override
protected ClassLoader getFallbackClassLoader() throws IOException {
return RMIClassLoader.getClassLoader(this.codebaseUrl);
}

1
org.springframework.context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java

@ -167,6 +167,7 @@ public class JndiRmiClientInterceptor extends JndiObjectLocator implements Metho @@ -167,6 +167,7 @@ public class JndiRmiClientInterceptor extends JndiObjectLocator implements Metho
}
@Override
public void afterPropertiesSet() throws NamingException {
super.afterPropertiesSet();
prepare();

1
org.springframework.context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java

@ -72,6 +72,7 @@ public class JndiRmiProxyFactoryBean extends JndiRmiClientInterceptor implements @@ -72,6 +72,7 @@ public class JndiRmiProxyFactoryBean extends JndiRmiClientInterceptor implements
this.beanClassLoader = classLoader;
}
@Override
public void afterPropertiesSet() throws NamingException {
super.afterPropertiesSet();
if (getServiceInterface() == null) {

1
org.springframework.context/src/main/java/org/springframework/remoting/rmi/RmiBasedExporter.java

@ -66,6 +66,7 @@ public abstract class RmiBasedExporter extends RemoteInvocationBasedExporter { @@ -66,6 +66,7 @@ public abstract class RmiBasedExporter extends RemoteInvocationBasedExporter {
* Redefined here to be visible to RmiInvocationWrapper.
* Simply delegates to the corresponding superclass method.
*/
@Override
protected Object invoke(RemoteInvocation invocation, Object targetObject)
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {

2
org.springframework.context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java

@ -129,6 +129,7 @@ public class RmiClientInterceptor extends RemoteInvocationBasedAccessor @@ -129,6 +129,7 @@ public class RmiClientInterceptor extends RemoteInvocationBasedAccessor
}
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
prepare();
@ -405,6 +406,7 @@ public class RmiClientInterceptor extends RemoteInvocationBasedAccessor @@ -405,6 +406,7 @@ public class RmiClientInterceptor extends RemoteInvocationBasedAccessor
*/
private static class DummyURLStreamHandler extends URLStreamHandler {
@Override
protected URLConnection openConnection(URL url) throws IOException {
throw new UnsupportedOperationException();
}

2
org.springframework.context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java

@ -65,6 +65,7 @@ public abstract class RmiClientInterceptorUtils { @@ -65,6 +65,7 @@ public abstract class RmiClientInterceptorUtils {
* will be automatically converted to Spring's RemoteAccessException.
* @deprecated as of Spring 2.5, in favor of {@link #invokeRemoteMethod}
*/
@Deprecated
public static Object invoke(MethodInvocation invocation, Remote stub, String serviceName) throws Throwable {
try {
return invokeRemoteMethod(invocation, stub);
@ -86,6 +87,7 @@ public abstract class RmiClientInterceptorUtils { @@ -86,6 +87,7 @@ public abstract class RmiClientInterceptorUtils {
* letting reflection exceptions through as-is.
* @deprecated as of Spring 2.5, in favor of {@link #invokeRemoteMethod}
*/
@Deprecated
public static Object doInvoke(MethodInvocation invocation, Remote stub) throws InvocationTargetException {
return invokeRemoteMethod(invocation, stub);
}

1
org.springframework.context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java

@ -63,6 +63,7 @@ public class RmiProxyFactoryBean extends RmiClientInterceptor implements Factory @@ -63,6 +63,7 @@ public class RmiProxyFactoryBean extends RmiClientInterceptor implements Factory
private Object serviceProxy;
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
if (getServiceInterface() == null) {

1
org.springframework.context/src/main/java/org/springframework/remoting/support/RemoteInvocation.java

@ -206,6 +206,7 @@ public class RemoteInvocation implements Serializable { @@ -206,6 +206,7 @@ public class RemoteInvocation implements Serializable {
}
@Override
public String toString() {
return "RemoteInvocation: method name '" + this.methodName + "'; parameter types " +
ClassUtils.classNamesToString(this.parameterTypes);

1
org.springframework.context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java

@ -224,6 +224,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory @@ -224,6 +224,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory
this.waitForTasksToCompleteOnShutdown = waitForJobsToCompleteOnShutdown;
}
@Override
public void setThreadNamePrefix(String threadNamePrefix) {
super.setThreadNamePrefix(threadNamePrefix);
this.threadNamePrefixSet = true;

1
org.springframework.context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java

@ -223,6 +223,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory @@ -223,6 +223,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory
this.waitForTasksToCompleteOnShutdown = waitForJobsToCompleteOnShutdown;
}
@Override
public void setThreadNamePrefix(String threadNamePrefix) {
super.setThreadNamePrefix(threadNamePrefix);
this.threadNamePrefixSet = true;

1
org.springframework.context/src/main/java/org/springframework/scheduling/support/MethodInvokingRunnable.java

@ -62,6 +62,7 @@ public class MethodInvokingRunnable extends ArgumentConvertingMethodInvoker @@ -62,6 +62,7 @@ public class MethodInvokingRunnable extends ArgumentConvertingMethodInvoker
this.beanClassLoader = classLoader;
}
@Override
protected Class resolveClassName(String className) throws ClassNotFoundException {
return ClassUtils.forName(className, this.beanClassLoader);
}

1
org.springframework.context/src/main/java/org/springframework/scheduling/timer/DelegatingTimerTask.java

@ -61,6 +61,7 @@ public class DelegatingTimerTask extends TimerTask { @@ -61,6 +61,7 @@ public class DelegatingTimerTask extends TimerTask {
* Delegates execution to the underlying Runnable, catching any exception
* or error thrown in order to continue scheduled execution.
*/
@Override
public void run() {
try {
this.delegate.run();

1
org.springframework.context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java

@ -48,6 +48,7 @@ public class MethodInvokingTimerTaskFactoryBean extends MethodInvokingRunnable i @@ -48,6 +48,7 @@ public class MethodInvokingTimerTaskFactoryBean extends MethodInvokingRunnable i
private TimerTask timerTask;
@Override
public void afterPropertiesSet() throws ClassNotFoundException, NoSuchMethodException {
super.afterPropertiesSet();
this.timerTask = new DelegatingTimerTask(this);

1
org.springframework.context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java

@ -131,6 +131,7 @@ public class TimerFactoryBean implements FactoryBean, BeanNameAware, Initializin @@ -131,6 +131,7 @@ public class TimerFactoryBean implements FactoryBean, BeanNameAware, Initializin
* Can be overridden in subclasses to provide custom Timer subclasses.
* @deprecated as of Spring 2.0.1, in favor of {@link #createTimer(String, boolean)}
*/
@Deprecated
protected Timer createTimer(boolean daemon) {
return null;
}

1
org.springframework.context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java

@ -184,6 +184,7 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware { @@ -184,6 +184,7 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware {
}
@Override
public String toString() {
return "BshScriptFactory: script source locator [" + this.scriptSourceLocator + "]";
}

2
org.springframework.context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java

@ -96,6 +96,7 @@ class ScriptBeanDefinitionParser extends AbstractBeanDefinitionParser { @@ -96,6 +96,7 @@ class ScriptBeanDefinitionParser extends AbstractBeanDefinitionParser {
* Parses the dynamic object element and returns the resulting bean definition.
* Registers a {@link ScriptFactoryPostProcessor} if needed.
*/
@Override
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
// Resolve the script source.
String value = resolveScriptSource(element, parserContext.getReaderContext());
@ -209,6 +210,7 @@ class ScriptBeanDefinitionParser extends AbstractBeanDefinitionParser { @@ -209,6 +210,7 @@ class ScriptBeanDefinitionParser extends AbstractBeanDefinitionParser {
/**
* Scripted beans may be anonymous as well.
*/
@Override
protected boolean shouldGenerateIdAsFallback() {
return true;
}

1
org.springframework.context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java

@ -262,6 +262,7 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea @@ -262,6 +262,7 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea
}
@Override
public String toString() {
return "GroovyScriptFactory: script source locator [" + this.scriptSourceLocator + "]";
}

1
org.springframework.context/src/main/java/org/springframework/scripting/jruby/JRubyScriptFactory.java

@ -119,6 +119,7 @@ public class JRubyScriptFactory implements ScriptFactory, BeanClassLoaderAware { @@ -119,6 +119,7 @@ public class JRubyScriptFactory implements ScriptFactory, BeanClassLoaderAware {
}
@Override
public String toString() {
return "JRubyScriptFactory: script source locator [" + this.scriptSourceLocator + "]";
}

2
org.springframework.context/src/main/java/org/springframework/scripting/support/RefreshableScriptTargetSource.java

@ -66,6 +66,7 @@ public class RefreshableScriptTargetSource extends BeanFactoryRefreshableTargetS @@ -66,6 +66,7 @@ public class RefreshableScriptTargetSource extends BeanFactoryRefreshableTargetS
* ScriptFactory's <code>requiresScriptedObjectRefresh</code> method.
* @see ScriptFactory#requiresScriptedObjectRefresh(ScriptSource)
*/
@Override
protected boolean requiresRefresh() {
return this.scriptFactory.requiresScriptedObjectRefresh(this.scriptSource);
}
@ -73,6 +74,7 @@ public class RefreshableScriptTargetSource extends BeanFactoryRefreshableTargetS @@ -73,6 +74,7 @@ public class RefreshableScriptTargetSource extends BeanFactoryRefreshableTargetS
/**
* Obtain a fresh target object, retrieving a FactoryBean if necessary.
*/
@Override
protected Object obtainFreshBean(BeanFactory beanFactory, String beanName) {
return super.obtainFreshBean(beanFactory,
(this.isFactoryBean ? BeanFactory.FACTORY_BEAN_PREFIX + beanName : beanName));

1
org.springframework.context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java

@ -124,6 +124,7 @@ public class ResourceScriptSource implements ScriptSource { @@ -124,6 +124,7 @@ public class ResourceScriptSource implements ScriptSource {
}
@Override
public String toString() {
return this.resource.toString();
}

2
org.springframework.context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java

@ -219,6 +219,7 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces @@ -219,6 +219,7 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces
}
@Override
public Class predictBeanType(Class beanClass, String beanName) {
// We only apply special treatment to ScriptFactory implementations here.
if (!ScriptFactory.class.isAssignableFrom(beanClass)) {
@ -271,6 +272,7 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces @@ -271,6 +272,7 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces
return null;
}
@Override
public Object postProcessBeforeInstantiation(Class beanClass, String beanName) {
// We only apply special treatment to ScriptFactory implementations here.
if (!ScriptFactory.class.isAssignableFrom(beanClass)) {

1
org.springframework.context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java

@ -82,6 +82,7 @@ public class StaticScriptSource implements ScriptSource { @@ -82,6 +82,7 @@ public class StaticScriptSource implements ScriptSource {
}
@Override
public String toString() {
return "static script" + (this.className != null ? " [" + this.className + "]" : "");
}

4
org.springframework.context/src/main/java/org/springframework/ui/ModelMap.java

@ -150,6 +150,7 @@ public class ModelMap extends LinkedHashMap { @@ -150,6 +150,7 @@ public class ModelMap extends LinkedHashMap {
/**
* @deprecated as of Spring 2.5, in favor of {@link #addAttribute(String, Object)}
*/
@Deprecated
public ModelMap addObject(String modelName, Object modelObject) {
return addAttribute(modelName, modelObject);
}
@ -157,6 +158,7 @@ public class ModelMap extends LinkedHashMap { @@ -157,6 +158,7 @@ public class ModelMap extends LinkedHashMap {
/**
* @deprecated as of Spring 2.5, in favor of {@link #addAttribute(Object)}
*/
@Deprecated
public ModelMap addObject(Object modelObject) {
return addAttribute(modelObject);
}
@ -164,6 +166,7 @@ public class ModelMap extends LinkedHashMap { @@ -164,6 +166,7 @@ public class ModelMap extends LinkedHashMap {
/**
* @deprecated as of Spring 2.5, in favor of {@link #addAllAttributes(Collection)}
*/
@Deprecated
public ModelMap addAllObjects(Collection objects) {
return addAllAttributes(objects);
}
@ -171,6 +174,7 @@ public class ModelMap extends LinkedHashMap { @@ -171,6 +174,7 @@ public class ModelMap extends LinkedHashMap {
/**
* @deprecated as of Spring 2.5, in favor of {@link #addAllAttributes(Map)}
*/
@Deprecated
public ModelMap addAllObjects(Map objects) {
return addAllAttributes(objects);
}

10
org.springframework.context/src/main/java/org/springframework/validation/AbstractBindingResult.java

@ -135,14 +135,17 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi @@ -135,14 +135,17 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
}
@Override
public boolean hasErrors() {
return !this.errors.isEmpty();
}
@Override
public int getErrorCount() {
return this.errors.size();
}
@Override
public List getAllErrors() {
return Collections.unmodifiableList(this.errors);
}
@ -158,6 +161,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi @@ -158,6 +161,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
return Collections.unmodifiableList(result);
}
@Override
public ObjectError getGlobalError() {
for (Iterator it = this.errors.iterator(); it.hasNext();) {
ObjectError objectError = (ObjectError) it.next();
@ -179,6 +183,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi @@ -179,6 +183,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
return Collections.unmodifiableList(result);
}
@Override
public FieldError getFieldError() {
for (Iterator it = this.errors.iterator(); it.hasNext();) {
Object error = it.next();
@ -189,6 +194,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi @@ -189,6 +194,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
return null;
}
@Override
public List getFieldErrors(String field) {
List result = new LinkedList();
String fixedField = fixedField(field);
@ -201,6 +207,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi @@ -201,6 +207,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
return Collections.unmodifiableList(result);
}
@Override
public FieldError getFieldError(String field) {
String fixedField = fixedField(field);
for (Iterator it = this.errors.iterator(); it.hasNext();) {
@ -238,6 +245,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi @@ -238,6 +245,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
* the type from a descriptor, even for <code>null</code> values.
* @see #getActualFieldValue
*/
@Override
public Class getFieldType(String field) {
Object value = getActualFieldValue(fixedField(field));
if (value != null) {
@ -329,6 +337,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi @@ -329,6 +337,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
@ -342,6 +351,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi @@ -342,6 +351,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
getAllErrors().equals(otherResult.getAllErrors()));
}
@Override
public int hashCode() {
return getObjectName().hashCode() * 29 + getTarget().hashCode();
}

1
org.springframework.context/src/main/java/org/springframework/validation/AbstractErrors.java

@ -210,6 +210,7 @@ public abstract class AbstractErrors implements Errors, Serializable { @@ -210,6 +210,7 @@ public abstract class AbstractErrors implements Errors, Serializable {
}
@Override
public String toString() {
StringBuffer sb = new StringBuffer(getClass().getName());
sb.append(": ").append(getErrorCount()).append(" errors");

5
org.springframework.context/src/main/java/org/springframework/validation/AbstractPropertyBindingResult.java

@ -51,6 +51,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul @@ -51,6 +51,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul
* Returns the underlying PropertyAccessor.
* @see #getPropertyAccessor()
*/
@Override
public PropertyEditorRegistry getPropertyEditorRegistry() {
return getPropertyAccessor();
}
@ -59,6 +60,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul @@ -59,6 +60,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul
* Returns the canonical property name.
* @see org.springframework.beans.PropertyAccessorUtils#canonicalPropertyName
*/
@Override
protected String canonicalFieldName(String field) {
return PropertyAccessorUtils.canonicalPropertyName(field);
}
@ -67,6 +69,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul @@ -67,6 +69,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul
* Determines the field type from the property type.
* @see #getPropertyAccessor()
*/
@Override
public Class getFieldType(String field) {
return getPropertyAccessor().getPropertyType(fixedField(field));
}
@ -75,6 +78,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul @@ -75,6 +78,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul
* Fetches the field value from the PropertyAccessor.
* @see #getPropertyAccessor()
*/
@Override
protected Object getActualFieldValue(String field) {
return getPropertyAccessor().getPropertyValue(field);
}
@ -83,6 +87,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul @@ -83,6 +87,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul
* Formats the field value based on registered PropertyEditors.
* @see #getCustomEditor
*/
@Override
protected Object formatFieldValue(String field, Object value) {
PropertyEditor customEditor = getCustomEditor(field);
if (customEditor != null) {

2
org.springframework.context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java

@ -58,6 +58,7 @@ public class BeanPropertyBindingResult extends AbstractPropertyBindingResult imp @@ -58,6 +58,7 @@ public class BeanPropertyBindingResult extends AbstractPropertyBindingResult imp
}
@Override
public final Object getTarget() {
return this.target;
}
@ -67,6 +68,7 @@ public class BeanPropertyBindingResult extends AbstractPropertyBindingResult imp @@ -67,6 +68,7 @@ public class BeanPropertyBindingResult extends AbstractPropertyBindingResult imp
* Creates a new one if none existed before.
* @see #createBeanWrapper()
*/
@Override
public final ConfigurablePropertyAccessor getPropertyAccessor() {
if (this.beanWrapper == null) {
this.beanWrapper = createBeanWrapper();

4
org.springframework.context/src/main/java/org/springframework/validation/BindException.java

@ -48,6 +48,7 @@ public class BindException extends Exception implements BindingResult { @@ -48,6 +48,7 @@ public class BindException extends Exception implements BindingResult {
* @deprecated in favor of <code>BindingResult.MODEL_KEY_PREFIX</code>
* @see BindingResult#MODEL_KEY_PREFIX
*/
@Deprecated
public static final String ERROR_KEY_PREFIX = BindException.class.getName() + ".";
@ -243,14 +244,17 @@ public class BindException extends Exception implements BindingResult { @@ -243,14 +244,17 @@ public class BindException extends Exception implements BindingResult {
/**
* Returns diagnostic information about the errors held in this object.
*/
@Override
public String getMessage() {
return this.bindingResult.toString();
}
@Override
public boolean equals(Object other) {
return (this == other || this.bindingResult.equals(other));
}
@Override
public int hashCode() {
return this.bindingResult.hashCode();
}

1
org.springframework.context/src/main/java/org/springframework/validation/DataBinder.java

@ -264,6 +264,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter { @@ -264,6 +264,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
* to create a BindException instance if still needed.
* @see #getBindingResult()
*/
@Deprecated
public BindException getErrors() {
if (this.bindException == null) {
this.bindException = new BindException(getBindingResult());

2
org.springframework.context/src/main/java/org/springframework/validation/DirectFieldBindingResult.java

@ -52,6 +52,7 @@ public class DirectFieldBindingResult extends AbstractPropertyBindingResult { @@ -52,6 +52,7 @@ public class DirectFieldBindingResult extends AbstractPropertyBindingResult {
}
@Override
public final Object getTarget() {
return this.target;
}
@ -61,6 +62,7 @@ public class DirectFieldBindingResult extends AbstractPropertyBindingResult { @@ -61,6 +62,7 @@ public class DirectFieldBindingResult extends AbstractPropertyBindingResult {
* Creates a new one if none existed before.
* @see #createDirectFieldAccessor()
*/
@Override
public final ConfigurablePropertyAccessor getPropertyAccessor() {
if (this.directFieldAccessor == null) {
this.directFieldAccessor = createDirectFieldAccessor();

3
org.springframework.context/src/main/java/org/springframework/validation/FieldError.java

@ -96,11 +96,13 @@ public class FieldError extends ObjectError { @@ -96,11 +96,13 @@ public class FieldError extends ObjectError {
}
@Override
public String toString() {
return "Field error in object '" + getObjectName() + "' on field '" + this.field +
"': rejected value [" + this.rejectedValue + "]; " + resolvableToString();
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
@ -114,6 +116,7 @@ public class FieldError extends ObjectError { @@ -114,6 +116,7 @@ public class FieldError extends ObjectError {
isBindingFailure() == otherError.isBindingFailure();
}
@Override
public int hashCode() {
int hashCode = super.hashCode();
hashCode = 29 * hashCode + getField().hashCode();

2
org.springframework.context/src/main/java/org/springframework/validation/MapBindingResult.java

@ -54,10 +54,12 @@ public class MapBindingResult extends AbstractBindingResult implements Serializa @@ -54,10 +54,12 @@ public class MapBindingResult extends AbstractBindingResult implements Serializa
return this.target;
}
@Override
public final Object getTarget() {
return this.target;
}
@Override
protected Object getActualFieldValue(String field) {
return this.target.get(field);
}

3
org.springframework.context/src/main/java/org/springframework/validation/ObjectError.java

@ -67,10 +67,12 @@ public class ObjectError extends DefaultMessageSourceResolvable { @@ -67,10 +67,12 @@ public class ObjectError extends DefaultMessageSourceResolvable {
}
@Override
public String toString() {
return "Error in object '" + this.objectName + "': " + resolvableToString();
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
@ -82,6 +84,7 @@ public class ObjectError extends DefaultMessageSourceResolvable { @@ -82,6 +84,7 @@ public class ObjectError extends DefaultMessageSourceResolvable {
return getObjectName().equals(otherError.getObjectName());
}
@Override
public int hashCode() {
return super.hashCode() * 29 + getObjectName().hashCode();
}

2
org.springframework.context/src/main/java/org/springframework/validation/support/BindingAwareModelMap.java

@ -36,11 +36,13 @@ import org.springframework.validation.BindingResult; @@ -36,11 +36,13 @@ import org.springframework.validation.BindingResult;
*/
public class BindingAwareModelMap extends ExtendedModelMap {
@Override
public Object put(Object key, Object value) {
removeBindingResultIfNecessary(key, value);
return super.put(key, value);
}
@Override
public void putAll(Map map) {
for (Map.Entry entry : (Set<Map.Entry>) map.entrySet()) {
removeBindingResultIfNecessary(entry.getKey(), entry.getValue());

Loading…
Cancel
Save