language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java
@@ -58,6 +58,7 @@ */ public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator implements BeanDefinitionDecorator { + @Override public final BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definitionHolder, ParserContext parserContext) { BeanDefinitionRegistry registry = parserContext.getRegistry();
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java
@@ -91,6 +91,7 @@ private String buildDescription(BeanReference adviceReference, BeanReference poi } + @Override public String getName() { return this.advisorBeanName; } @@ -110,6 +111,7 @@ public BeanReference[] getBeanReferences() { return this.beanReferences; } + @Override public Object getSource() { return this.advisorDefinition.getSource(); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java
@@ -59,6 +59,7 @@ public class AopNamespaceHandler extends NamespaceHandlerSupport { * '{@code config}', '{@code spring-configured}', '{@code aspectj-autoproxy}' * and '{@code scoped-proxy}' tags. */ + @Override public void init() { // In 2.0 XSD as well as in 2.1 XSD. registerBeanDefinitionParser("config", new ConfigBeanDefinitionParser());
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java
@@ -37,6 +37,7 @@ */ class AspectJAutoProxyBeanDefinitionParser implements BeanDefinitionParser { + @Override public BeanDefinition parse(Element element, ParserContext parserContext) { AopNamespaceUtils.registerAspectJAnnotationAutoProxyCreatorIfNecessary(parserContext, element); extendBeanDefinition(element, parserContext);
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java
@@ -95,6 +95,7 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser { private ParseState parseState = new ParseState(); + @Override public BeanDefinition parse(Element element, ParserContext parserContext) { CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element));
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/MethodLocatingFactoryBean.java
@@ -57,6 +57,7 @@ public void setMethodName(String methodName) { this.methodName = methodName; } + @Override public void setBeanFactory(BeanFactory beanFactory) { if (!StringUtils.hasText(this.targetBeanName)) { throw new IllegalArgumentException("Property 'targetBeanName' is required"); @@ -78,14 +79,17 @@ public void setBeanFactory(BeanFactory beanFactory) { } + @Override public Method getObject() throws Exception { return this.method; } + @Override public Class<Method> getObjectType() { return Method.class; } + @Override public boolean isSingleton() { return true; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/PointcutComponentDefinition.java
@@ -46,6 +46,7 @@ public PointcutComponentDefinition(String pointcutBeanName, BeanDefinition point } + @Override public String getName() { return this.pointcutBeanName; } @@ -60,6 +61,7 @@ public BeanDefinition[] getBeanDefinitions() { return new BeanDefinition[] {this.pointcutDefinition}; } + @Override public Object getSource() { return this.pointcutDefinition.getSource(); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java
@@ -39,6 +39,7 @@ class ScopedProxyBeanDefinitionDecorator implements BeanDefinitionDecorator { private static final String PROXY_TARGET_CLASS = "proxy-target-class"; + @Override public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) { boolean proxyTargetClass = true; if (node instanceof Element) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java
@@ -47,6 +47,7 @@ public void setAspectBeanName(String aspectBeanName) { this.aspectBeanName = aspectBeanName; } + @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; if (!StringUtils.hasText(this.aspectBeanName)) { @@ -59,10 +60,12 @@ public void setBeanFactory(BeanFactory beanFactory) { * Look up the aspect bean from the {@link BeanFactory} and returns it. * @see #setAspectBeanName */ + @Override public Object getAspectInstance() { return this.beanFactory.getBean(this.aspectBeanName); } + @Override public ClassLoader getAspectClassLoader() { if (this.beanFactory instanceof ConfigurableBeanFactory) { return ((ConfigurableBeanFactory) this.beanFactory).getBeanClassLoader(); @@ -72,6 +75,7 @@ public ClassLoader getAspectClassLoader() { } } + @Override public int getOrder() { if (this.beanFactory.isSingleton(this.aspectBeanName) && this.beanFactory.isTypeMatch(this.aspectBeanName, Ordered.class)) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java
@@ -50,6 +50,7 @@ class SpringConfiguredBeanDefinitionParser implements BeanDefinitionParser { "org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"; + @Override public BeanDefinition parse(Element element, ParserContext parserContext) { if (!parserContext.getRegistry().containsBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME)) { RootBeanDefinition def = new RootBeanDefinition();
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java
@@ -65,6 +65,7 @@ public void setBeforeExistingAdvisors(boolean beforeExistingAdvisors) { this.beforeExistingAdvisors = beforeExistingAdvisors; } + @Override public void setBeanClassLoader(ClassLoader beanClassLoader) { this.beanClassLoader = beanClassLoader; } @@ -73,15 +74,18 @@ public void setOrder(int order) { this.order = order; } + @Override public int getOrder() { return this.order; } + @Override public Object postProcessBeforeInitialization(Object bean, String beanName) { return bean; } + @Override public Object postProcessAfterInitialization(Object bean, String beanName) { if (bean instanceof AopInfrastructureBean) { // Ignore AOP infrastructure such as scoped proxies.
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java
@@ -122,13 +122,15 @@ public void setProxyClassLoader(ClassLoader classLoader) { this.proxyClassLoader = classLoader; } + @Override public void setBeanClassLoader(ClassLoader classLoader) { if (this.proxyClassLoader == null) { this.proxyClassLoader = classLoader; } } + @Override public void afterPropertiesSet() { if (this.target == null) { throw new IllegalArgumentException("Property 'target' is required"); @@ -190,13 +192,15 @@ protected TargetSource createTargetSource(Object target) { } + @Override public Object getObject() { if (this.proxy == null) { throw new FactoryBeanNotInitializedException(); } return this.proxy; } + @Override public Class<?> getObjectType() { if (this.proxy != null) { return this.proxy.getClass(); @@ -213,6 +217,7 @@ public Class<?> getObjectType() { return null; } + @Override public final boolean isSingleton() { return true; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java
@@ -137,10 +137,12 @@ public void setTarget(Object target) { setTargetSource(new SingletonTargetSource(target)); } + @Override public void setTargetSource(TargetSource targetSource) { this.targetSource = (targetSource != null ? targetSource : EMPTY_TARGET_SOURCE); } + @Override public TargetSource getTargetSource() { return this.targetSource; } @@ -162,14 +164,17 @@ public void setTargetClass(Class targetClass) { this.targetSource = EmptyTargetSource.forClass(targetClass); } + @Override public Class<?> getTargetClass() { return this.targetSource.getTargetClass(); } + @Override public void setPreFiltered(boolean preFiltered) { this.preFiltered = preFiltered; } + @Override public boolean isPreFiltered() { return this.preFiltered; } @@ -228,10 +233,12 @@ public boolean removeInterface(Class intf) { return this.interfaces.remove(intf); } + @Override public Class[] getProxiedInterfaces() { return this.interfaces.toArray(new Class[this.interfaces.size()]); } + @Override public boolean isInterfaceProxied(Class intf) { for (Class proxyIntf : this.interfaces) { if (intf.isAssignableFrom(proxyIntf)) { @@ -242,22 +249,26 @@ public boolean isInterfaceProxied(Class intf) { } + @Override public final Advisor[] getAdvisors() { return this.advisorArray; } + @Override public void addAdvisor(Advisor advisor) { int pos = this.advisors.size(); addAdvisor(pos, advisor); } + @Override public void addAdvisor(int pos, Advisor advisor) throws AopConfigException { if (advisor instanceof IntroductionAdvisor) { validateIntroductionAdvisor((IntroductionAdvisor) advisor); } addAdvisorInternal(pos, advisor); } + @Override public boolean removeAdvisor(Advisor advisor) { int index = indexOf(advisor); if (index == -1) { @@ -269,6 +280,7 @@ public boolean removeAdvisor(Advisor advisor) { } } + @Override public void removeAdvisor(int index) throws AopConfigException { if (isFrozen()) { throw new AopConfigException("Cannot remove Advisor: Configuration is frozen."); @@ -292,11 +304,13 @@ public void removeAdvisor(int index) throws AopConfigException { adviceChanged(); } + @Override public int indexOf(Advisor advisor) { Assert.notNull(advisor, "Advisor must not be null"); return this.advisors.indexOf(advisor); } + @Override public boolean replaceAdvisor(Advisor a, Advisor b) throws AopConfigException { Assert.notNull(a, "Advisor a must not be null"); Assert.notNull(b, "Advisor b must not be null"); @@ -378,6 +392,7 @@ protected final List<Advisor> getAdvisorsInternal() { } + @Override public void addAdvice(Advice advice) throws AopConfigException { int pos = this.advisors.size(); addAdvice(pos, advice); @@ -386,6 +401,7 @@ public void addAdvice(Advice advice) throws AopConfigException { /** * Cannot add introductions this way unless the advice implements IntroductionInfo. */ + @Override public void addAdvice(int pos, Advice advice) throws AopConfigException { Assert.notNull(advice, "Advice must not be null"); if (advice instanceof IntroductionInfo) { @@ -402,6 +418,7 @@ else if (advice instanceof DynamicIntroductionAdvice) { } } + @Override public boolean removeAdvice(Advice advice) throws AopConfigException { int index = indexOf(advice); if (index == -1) { @@ -413,6 +430,7 @@ public boolean removeAdvice(Advice advice) throws AopConfigException { } } + @Override public int indexOf(Advice advice) { Assert.notNull(advice, "Advice must not be null"); for (int i = 0; i < this.advisors.size(); i++) { @@ -544,6 +562,7 @@ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFound } + @Override public String toProxyConfigString() { return toString(); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java
@@ -146,10 +146,12 @@ public void setConstructorArguments(Object[] constructorArgs, Class<?>[] constru } + @Override public Object getProxy() { return getProxy(null); } + @Override public Object getProxy(ClassLoader classLoader) { if (logger.isDebugEnabled()) { logger.debug("Creating CGLIB proxy: target source is " + this.advised.getTargetSource()); @@ -386,6 +388,7 @@ public StaticUnadvisedInterceptor(Object target) { this.target = target; } + @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object retVal = methodProxy.invoke(this.target, args); return processReturnType(proxy, this.target, method, retVal); @@ -405,6 +408,7 @@ public StaticUnadvisedExposedInterceptor(Object target) { this.target = target; } + @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object oldProxy = null; try { @@ -432,6 +436,7 @@ public DynamicUnadvisedInterceptor(TargetSource targetSource) { this.targetSource = targetSource; } + @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object target = this.targetSource.getTarget(); try { @@ -456,6 +461,7 @@ public DynamicUnadvisedExposedInterceptor(TargetSource targetSource) { this.targetSource = targetSource; } + @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object oldProxy = null; Object target = this.targetSource.getTarget(); @@ -485,6 +491,7 @@ public StaticDispatcher(Object target) { this.target = target; } + @Override public Object loadObject() { return this.target; } @@ -502,6 +509,7 @@ public AdvisedDispatcher(AdvisedSupport advised) { this.advised = advised; } + @Override public Object loadObject() throws Exception { return this.advised; } @@ -520,6 +528,7 @@ public EqualsInterceptor(AdvisedSupport advised) { this.advised = advised; } + @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) { Object other = args[0]; if (proxy == other) { @@ -552,6 +561,7 @@ public HashCodeInterceptor(AdvisedSupport advised) { this.advised = advised; } + @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) { return CglibAopProxy.class.hashCode() * 13 + this.advised.getTargetSource().hashCode(); } @@ -575,6 +585,7 @@ public FixedChainStaticTargetInterceptor(List<Object> adviceChain, Object target this.targetClass = targetClass; } + @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { MethodInvocation invocation = new CglibMethodInvocation(proxy, this.target, method, args, this.targetClass, this.adviceChain, methodProxy); @@ -598,6 +609,7 @@ public DynamicAdvisedInterceptor(AdvisedSupport advised) { this.advised = advised; } + @Override public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { Object oldProxy = null; boolean setProxyContext = false; @@ -754,6 +766,7 @@ public ProxyCallbackFilter(AdvisedSupport advised, Map<String, Integer> fixedInt * DynamicUnadvisedInterceptor already considers this.</dd> * </dl> */ + @Override public int accept(Method method) { if (AopUtils.isFinalizeMethod(method)) { logger.debug("Found finalize() method - using NO_OVERRIDE");
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/DefaultAdvisorChainFactory.java
@@ -46,6 +46,7 @@ @SuppressWarnings("serial") public class DefaultAdvisorChainFactory implements AdvisorChainFactory, Serializable { + @Override public List<Object> getInterceptorsAndDynamicInterceptionAdvice( Advised config, Method method, Class targetClass) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/DefaultAopProxyFactory.java
@@ -49,6 +49,7 @@ public class DefaultAopProxyFactory implements AopProxyFactory, Serializable { + @Override public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException { if (config.isOptimize() || config.isProxyTargetClass() || hasNoUserSuppliedProxyInterfaces(config)) { Class targetClass = config.getTargetClass();
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java
@@ -106,10 +106,12 @@ public JdkDynamicAopProxy(AdvisedSupport config) throws AopConfigException { } + @Override public Object getProxy() { return getProxy(ClassUtils.getDefaultClassLoader()); } + @Override public Object getProxy(ClassLoader classLoader) { if (logger.isDebugEnabled()) { logger.debug("Creating JDK dynamic proxy: target source is " + this.advised.getTargetSource()); @@ -147,6 +149,7 @@ private void findDefinedEqualsAndHashCodeMethods(Class[] proxiedInterfaces) { * <p>Callers will see exactly the exception thrown by the target, * unless a hook method throws an exception. */ + @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { MethodInvocation invocation; Object oldProxy = null;
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java
@@ -218,12 +218,14 @@ public void setProxyClassLoader(ClassLoader classLoader) { this.classLoaderConfigured = (classLoader != null); } + @Override public void setBeanClassLoader(ClassLoader classLoader) { if (!this.classLoaderConfigured) { this.proxyClassLoader = classLoader; } } + @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; checkInterceptorNames(); @@ -237,6 +239,7 @@ public void setBeanFactory(BeanFactory beanFactory) { * {@code getObject()} for a proxy. * @return a fresh AOP proxy reflecting the current state of this factory */ + @Override public Object getObject() throws BeansException { initializeAdvisorChain(); if (isSingleton()) { @@ -257,6 +260,7 @@ public Object getObject() throws BeansException { * a single one), the target bean type, or the TargetSource's target class. * @see org.springframework.aop.TargetSource#getTargetClass */ + @Override public Class<?> getObjectType() { synchronized (this) { if (this.singletonInstance != null) { @@ -278,6 +282,7 @@ else if (this.targetName != null && this.beanFactory != null) { } } + @Override public boolean isSingleton() { return this.singleton; } @@ -638,10 +643,12 @@ public String getBeanName() { return beanName; } + @Override public Advice getAdvice() { throw new UnsupportedOperationException("Cannot invoke methods: " + this.message); } + @Override public boolean isPerInstance() { throw new UnsupportedOperationException("Cannot invoke methods: " + this.message); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java
@@ -114,14 +114,17 @@ protected ReflectiveMethodInvocation( } + @Override public final Object getProxy() { return this.proxy; } + @Override public final Object getThis() { return this.target; } + @Override public final AccessibleObject getStaticPart() { return this.method; } @@ -131,19 +134,23 @@ public final AccessibleObject getStaticPart() { * May or may not correspond with a method invoked on an underlying * implementation of that interface. */ + @Override public final Method getMethod() { return this.method; } + @Override public final Object[] getArguments() { return (this.arguments != null ? this.arguments : new Object[0]); } + @Override public void setArguments(Object[] arguments) { this.arguments = arguments; } + @Override public Object proceed() throws Throwable { // We start with an index of -1 and increment early. if (this.currentInterceptorIndex == this.interceptorsAndDynamicMethodMatchers.size() - 1) { @@ -192,6 +199,7 @@ protected Object invokeJoinpoint() throws Throwable { * current interceptor index. * @see java.lang.Object#clone() */ + @Override public MethodInvocation invocableClone() { Object[] cloneArguments = null; if (this.arguments != null) { @@ -210,6 +218,7 @@ public MethodInvocation invocableClone() { * current interceptor index. * @see java.lang.Object#clone() */ + @Override public MethodInvocation invocableClone(Object[] arguments) { // Force initialization of the user attributes Map, // for having a shared Map reference in the clone. @@ -230,6 +239,7 @@ public MethodInvocation invocableClone(Object[] arguments) { } + @Override public void setUserAttribute(String key, Object value) { if (value != null) { if (this.userAttributes == null) { @@ -244,6 +254,7 @@ public void setUserAttribute(String key, Object value) { } } + @Override public Object getUserAttribute(String key) { return (this.userAttributes != null ? this.userAttributes.get(key) : null); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationManager.java
@@ -48,10 +48,12 @@ public void setAdvisorAdapterRegistry(AdvisorAdapterRegistry advisorAdapterRegis } + @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } + @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof AdvisorAdapter){ this.advisorAdapterRegistry.registerAdvisorAdapter((AdvisorAdapter) bean);
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceAdapter.java
@@ -34,10 +34,12 @@ @SuppressWarnings("serial") class AfterReturningAdviceAdapter implements AdvisorAdapter, Serializable { + @Override public boolean supportsAdvice(Advice advice) { return (advice instanceof AfterReturningAdvice); } + @Override public MethodInterceptor getInterceptor(Advisor advisor) { AfterReturningAdvice advice = (AfterReturningAdvice) advisor.getAdvice(); return new AfterReturningAdviceInterceptor(advice);
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/adapter/AfterReturningAdviceInterceptor.java
@@ -47,6 +47,7 @@ public AfterReturningAdviceInterceptor(AfterReturningAdvice advice) { this.advice = advice; } + @Override public Object invoke(MethodInvocation mi) throws Throwable { Object retVal = mi.proceed(); this.advice.afterReturning(retVal, mi.getMethod(), mi.getArguments(), mi.getThis());
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/adapter/DefaultAdvisorAdapterRegistry.java
@@ -53,6 +53,7 @@ public DefaultAdvisorAdapterRegistry() { } + @Override public Advisor wrap(Object adviceObject) throws UnknownAdviceTypeException { if (adviceObject instanceof Advisor) { return (Advisor) adviceObject; @@ -74,6 +75,7 @@ public Advisor wrap(Object adviceObject) throws UnknownAdviceTypeException { throw new UnknownAdviceTypeException(advice); } + @Override public MethodInterceptor[] getInterceptors(Advisor advisor) throws UnknownAdviceTypeException { List<MethodInterceptor> interceptors = new ArrayList<MethodInterceptor>(3); Advice advice = advisor.getAdvice(); @@ -91,6 +93,7 @@ public MethodInterceptor[] getInterceptors(Advisor advisor) throws UnknownAdvice return interceptors.toArray(new MethodInterceptor[interceptors.size()]); } + @Override public void registerAdvisorAdapter(AdvisorAdapter adapter) { this.adapters.add(adapter); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceAdapter.java
@@ -34,10 +34,12 @@ @SuppressWarnings("serial") class MethodBeforeAdviceAdapter implements AdvisorAdapter, Serializable { + @Override public boolean supportsAdvice(Advice advice) { return (advice instanceof MethodBeforeAdvice); } + @Override public MethodInterceptor getInterceptor(Advisor advisor) { MethodBeforeAdvice advice = (MethodBeforeAdvice) advisor.getAdvice(); return new MethodBeforeAdviceInterceptor(advice);
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/adapter/MethodBeforeAdviceInterceptor.java
@@ -46,6 +46,7 @@ public MethodBeforeAdviceInterceptor(MethodBeforeAdvice advice) { this.advice = advice; } + @Override public Object invoke(MethodInvocation mi) throws Throwable { this.advice.before(mi.getMethod(), mi.getArguments(), mi.getThis() ); return mi.proceed();
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceAdapter.java
@@ -34,10 +34,12 @@ @SuppressWarnings("serial") class ThrowsAdviceAdapter implements AdvisorAdapter, Serializable { + @Override public boolean supportsAdvice(Advice advice) { return (advice instanceof ThrowsAdvice); } + @Override public MethodInterceptor getInterceptor(Advisor advisor) { return new ThrowsAdviceInterceptor(advisor.getAdvice()); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java
@@ -119,6 +119,7 @@ private Method getExceptionHandler(Throwable exception) { return handler; } + @Override public Object invoke(MethodInvocation mi) throws Throwable { try { return mi.proceed();
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java
@@ -157,6 +157,7 @@ public final void setOrder(int order) { this.order = order; } + @Override public final int getOrder() { return this.order; } @@ -234,12 +235,14 @@ public void setProxyClassLoader(ClassLoader classLoader) { this.classLoaderConfigured = (classLoader != null); } + @Override public void setBeanClassLoader(ClassLoader classLoader) { if (!this.classLoaderConfigured) { this.proxyClassLoader = classLoader; } } + @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } @@ -253,21 +256,25 @@ protected BeanFactory getBeanFactory() { } + @Override public Class<?> predictBeanType(Class<?> beanClass, String beanName) { Object cacheKey = getCacheKey(beanClass, beanName); return this.proxyTypes.get(cacheKey); } + @Override public Constructor<?>[] determineCandidateConstructors(Class<?> beanClass, String beanName) throws BeansException { return null; } + @Override public Object getEarlyBeanReference(Object bean, String beanName) throws BeansException { Object cacheKey = getCacheKey(bean.getClass(), beanName); this.earlyProxyReferences.add(cacheKey); return wrapIfNecessary(bean, beanName, cacheKey); } + @Override public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException { Object cacheKey = getCacheKey(beanClass, beanName); @@ -298,16 +305,19 @@ public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName return null; } + @Override public boolean postProcessAfterInstantiation(Object bean, String beanName) { return true; } + @Override public PropertyValues postProcessPropertyValues( PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) { return pvs; } + @Override public Object postProcessBeforeInitialization(Object bean, String beanName) { return bean; } @@ -317,6 +327,7 @@ public Object postProcessBeforeInitialization(Object bean, String beanName) { * identified as one to proxy by the subclass. * @see #getAdvicesAndAdvisorsForBean */ + @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean != null) { Object cacheKey = getCacheKey(bean.getClass(), beanName);
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java
@@ -79,6 +79,7 @@ public String getAdvisorBeanNamePrefix() { return this.advisorBeanNamePrefix; } + @Override public void setBeanName(String name) { // If no infrastructure bean name prefix has been set, override it. if (this.advisorBeanNamePrefix == null) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java
@@ -66,6 +66,7 @@ new HashMap<String, DefaultListableBeanFactory>(); + @Override public final void setBeanFactory(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableBeanFactory)) { throw new IllegalStateException("Cannot do auto-TargetSource creation with a BeanFactory " + @@ -86,6 +87,7 @@ protected final BeanFactory getBeanFactory() { // Implementation of the TargetSourceCreator interface //--------------------------------------------------------------------- + @Override public final TargetSource getTargetSource(Class<?> beanClass, String beanName) { AbstractBeanFactoryBasedTargetSource targetSource = createBeanFactoryBasedTargetSource(beanClass, beanName); @@ -159,6 +161,7 @@ protected DefaultListableBeanFactory buildInternalBeanFactory(ConfigurableBeanFa * Destroys the internal BeanFactory on shutdown of the TargetSourceCreator. * @see #getInternalBeanFactoryForBean */ + @Override public void destroy() { synchronized (this.internalBeanFactories) { for (DefaultListableBeanFactory bf : this.internalBeanFactories.values()) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java
@@ -105,6 +105,7 @@ public void setHideProxyClassNames(boolean hideProxyClassNames) { * to the {@code invokeUnderTrace} method for handling. * @see #invokeUnderTrace(org.aopalliance.intercept.MethodInvocation, org.apache.commons.logging.Log) */ + @Override public Object invoke(MethodInvocation invocation) throws Throwable { Log logger = getLoggerForInvocation(invocation); if (isInterceptorEnabled(invocation, logger)) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java
@@ -80,6 +80,7 @@ public void setExecutor(Executor defaultExecutor) { /** * Set the {@link BeanFactory} to be used when looking up executors by qualifier. */ + @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java
@@ -77,13 +77,15 @@ public AsyncExecutionInterceptor(Executor executor) { * @return {@link Future} if the original method returns {@code Future}; {@code null} * otherwise. */ + @Override public Object invoke(final MethodInvocation invocation) throws Throwable { Class<?> targetClass = (invocation.getThis() != null ? AopUtils.getTargetClass(invocation.getThis()) : null); Method specificMethod = ClassUtils.getMostSpecificMethod(invocation.getMethod(), targetClass); specificMethod = BridgeMethodResolver.findBridgedMethod(specificMethod); Future<?> result = determineAsyncExecutor(specificMethod).submit( new Callable<Object>() { + @Override public Object call() throws Exception { try { Object result = invocation.proceed(); @@ -119,6 +121,7 @@ protected String getExecutorQualifier(Method method) { return null; } + @Override public int getOrder() { return Ordered.HIGHEST_PRECEDENCE; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java
@@ -47,6 +47,7 @@ public ConcurrencyThrottleInterceptor() { setConcurrencyLimit(1); } + @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { beforeAccess(); try {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java
@@ -109,6 +109,7 @@ public ExposeBeanNameInterceptor(String beanName) { this.beanName = beanName; } + @Override public Object invoke(MethodInvocation mi) throws Throwable { if (!(mi instanceof ProxyMethodInvocation)) { throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi); @@ -142,6 +143,7 @@ public Object invoke(MethodInvocation mi) throws Throwable { return super.invoke(mi); } + @Override public String getBeanName() { return this.beanName; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java
@@ -84,6 +84,7 @@ public static MethodInvocation currentInvocation() throws IllegalStateException private ExposeInvocationInterceptor() { } + @Override public Object invoke(MethodInvocation mi) throws Throwable { MethodInvocation oldInvocation = invocation.get(); invocation.set(mi); @@ -95,6 +96,7 @@ public Object invoke(MethodInvocation mi) throws Throwable { } } + @Override public int getOrder() { return Ordered.HIGHEST_PRECEDENCE + 1; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java
@@ -55,10 +55,12 @@ public DefaultScopedObject(ConfigurableBeanFactory beanFactory, String targetBea } + @Override public Object getTargetObject() { return this.beanFactory.getBean(this.targetBeanName); } + @Override public void removeFromScope() { this.beanFactory.destroyScopedBean(this.targetBeanName); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java
@@ -78,6 +78,7 @@ public void setTargetBeanName(String targetBeanName) { this.scopedTargetSource.setTargetBeanName(targetBeanName); } + @Override public void setBeanFactory(BeanFactory beanFactory) { if (!(beanFactory instanceof ConfigurableBeanFactory)) { throw new IllegalStateException("Not running in a ConfigurableBeanFactory: " + beanFactory); @@ -111,13 +112,15 @@ public void setBeanFactory(BeanFactory beanFactory) { } + @Override public Object getObject() { if (this.proxy == null) { throw new FactoryBeanNotInitializedException(); } return this.proxy; } + @Override public Class<?> getObjectType() { if (this.proxy != null) { return this.proxy.getClass(); @@ -128,6 +131,7 @@ public Class<?> getObjectType() { return null; } + @Override public boolean isSingleton() { return true; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/AbstractBeanFactoryPointcutAdvisor.java
@@ -69,6 +69,7 @@ public String getAdviceBeanName() { return this.adviceBeanName; } + @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; } @@ -79,6 +80,7 @@ public void setAdvice(Advice advice) { } } + @Override public Advice getAdvice() { synchronized (this.adviceMonitor) { if (this.advice == null && this.adviceBeanName != null) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/AbstractExpressionPointcut.java
@@ -83,6 +83,7 @@ protected void onSetExpression(String expression) throws IllegalArgumentExceptio /** * Return this pointcut's expression. */ + @Override public String getExpression() { return this.expression; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/AbstractGenericPointcutAdvisor.java
@@ -39,6 +39,7 @@ public void setAdvice(Advice advice) { this.advice = advice; } + @Override public Advice getAdvice() { return this.advice; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/AbstractPointcutAdvisor.java
@@ -44,6 +44,7 @@ public void setOrder(int order) { this.order = order; } + @Override public int getOrder() { if (this.order != null) { return this.order; @@ -55,6 +56,7 @@ public int getOrder() { return Ordered.LOWEST_PRECEDENCE; } + @Override public boolean isPerInstance() { return true; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/AbstractRegexpMethodPointcut.java
@@ -124,6 +124,7 @@ public String[] getExcludedPatterns() { * of the target class as well as against the method's declaring class, * plus the name of the method. */ + @Override public boolean matches(Method method, Class targetClass) { return ((targetClass != null && matchesPattern(targetClass.getName() + "." + method.getName())) || matchesPattern(method.getDeclaringClass().getName() + "." + method.getName()));
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/ClassFilters.java
@@ -96,6 +96,7 @@ public UnionClassFilter(ClassFilter[] filters) { this.filters = filters; } + @Override public boolean matches(Class clazz) { for (int i = 0; i < this.filters.length; i++) { if (this.filters[i].matches(clazz)) { @@ -130,6 +131,7 @@ public IntersectionClassFilter(ClassFilter[] filters) { this.filters = filters; } + @Override public boolean matches(Class clazz) { for (int i = 0; i < this.filters.length; i++) { if (!this.filters[i].matches(clazz)) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java
@@ -170,10 +170,12 @@ public ComposablePointcut intersection(Pointcut other) { } + @Override public ClassFilter getClassFilter() { return this.classFilter; } + @Override public MethodMatcher getMethodMatcher() { return this.methodMatcher; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java
@@ -71,6 +71,7 @@ public ControlFlowPointcut(Class clazz, String methodName) { /** * Subclasses can override this for greater filtering (and performance). */ + @Override public boolean matches(Class clazz) { return true; } @@ -79,14 +80,17 @@ public boolean matches(Class clazz) { * Subclasses can override this if it's possible to filter out * some candidate classes. */ + @Override public boolean matches(Method method, Class targetClass) { return true; } + @Override public boolean isRuntime() { return true; } + @Override public boolean matches(Method method, Class targetClass, Object[] args) { ++this.evaluations; ControlFlow cflow = ControlFlowFactory.createControlFlow(); @@ -101,10 +105,12 @@ public int getEvaluations() { } + @Override public ClassFilter getClassFilter() { return this; } + @Override public MethodMatcher getMethodMatcher() { return this; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/DefaultBeanFactoryPointcutAdvisor.java
@@ -47,6 +47,7 @@ public void setPointcut(Pointcut pointcut) { this.pointcut = (pointcut != null ? pointcut : Pointcut.TRUE); } + @Override public Pointcut getPointcut() { return this.pointcut; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
@@ -102,10 +102,12 @@ public void addInterface(Class intf) { this.interfaces.add(intf); } + @Override public Class[] getInterfaces() { return this.interfaces.toArray(new Class[this.interfaces.size()]); } + @Override public void validateInterfaces() throws IllegalArgumentException { for (Class ifc : this.interfaces) { if (this.advice instanceof DynamicIntroductionAdvice && @@ -121,23 +123,28 @@ public void setOrder(int order) { this.order = order; } + @Override public int getOrder() { return this.order; } + @Override public Advice getAdvice() { return this.advice; } + @Override public boolean isPerInstance() { return true; } + @Override public ClassFilter getClassFilter() { return this; } + @Override public boolean matches(Class clazz) { return true; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java
@@ -77,6 +77,7 @@ public void setPointcut(Pointcut pointcut) { this.pointcut = (pointcut != null ? pointcut : Pointcut.TRUE); } + @Override public Pointcut getPointcut() { return this.pointcut; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java
@@ -83,6 +83,7 @@ public DelegatePerTargetObjectIntroductionInterceptor(Class defaultImplType, Cla * behaviour in around advice. However, subclasses should invoke this * method, which handles introduced interfaces and forwarding to the target. */ + @Override public Object invoke(MethodInvocation mi) throws Throwable { if (isMethodOnIntroducedInterface(mi)) { Object delegate = getIntroductionDelegateFor(mi.getThis());
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java
@@ -99,6 +99,7 @@ private void init(Object delegate) { * behaviour in around advice. However, subclasses should invoke this * method, which handles introduced interfaces and forwarding to the target. */ + @Override public Object invoke(MethodInvocation mi) throws Throwable { if (isMethodOnIntroducedInterface(mi)) { // Using the following method rather than direct reflection, we
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java
@@ -26,6 +26,7 @@ */ public abstract class DynamicMethodMatcher implements MethodMatcher { + @Override public final boolean isRuntime() { return true; } @@ -34,6 +35,7 @@ public final boolean isRuntime() { * Can override to add preconditions for dynamic matching. This implementation * always returns true. */ + @Override public boolean matches(Method method, Class<?> targetClass) { return true; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java
@@ -30,10 +30,12 @@ */ public abstract class DynamicMethodMatcherPointcut extends DynamicMethodMatcher implements Pointcut { + @Override public ClassFilter getClassFilter() { return ClassFilter.TRUE; } + @Override public final MethodMatcher getMethodMatcher() { return this; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/IntroductionInfoSupport.java
@@ -59,6 +59,7 @@ public void suppressInterface(Class intf) { this.publishedInterfaces.remove(intf); } + @Override public Class[] getInterfaces() { return this.publishedInterfaces.toArray(new Class[this.publishedInterfaces.size()]); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java
@@ -112,11 +112,13 @@ public UnionMethodMatcher(MethodMatcher mm1, MethodMatcher mm2) { this.mm2 = mm2; } + @Override public boolean matches(Method method, Class targetClass, boolean hasIntroductions) { return (matchesClass1(targetClass) && MethodMatchers.matches(this.mm1, method, targetClass, hasIntroductions)) || (matchesClass2(targetClass) && MethodMatchers.matches(this.mm2, method, targetClass, hasIntroductions)); } + @Override public boolean matches(Method method, Class targetClass) { return (matchesClass1(targetClass) && this.mm1.matches(method, targetClass)) || (matchesClass2(targetClass) && this.mm2.matches(method, targetClass)); @@ -130,10 +132,12 @@ protected boolean matchesClass2(Class targetClass) { return true; } + @Override public boolean isRuntime() { return this.mm1.isRuntime() || this.mm2.isRuntime(); } + @Override public boolean matches(Method method, Class targetClass, Object[] args) { return this.mm1.matches(method, targetClass, args) || this.mm2.matches(method, targetClass, args); } @@ -216,19 +220,23 @@ public IntersectionMethodMatcher(MethodMatcher mm1, MethodMatcher mm2) { this.mm2 = mm2; } + @Override public boolean matches(Method method, Class targetClass, boolean hasIntroductions) { return MethodMatchers.matches(this.mm1, method, targetClass, hasIntroductions) && MethodMatchers.matches(this.mm2, method, targetClass, hasIntroductions); } + @Override public boolean matches(Method method, Class targetClass) { return this.mm1.matches(method, targetClass) && this.mm2.matches(method, targetClass); } + @Override public boolean isRuntime() { return this.mm1.isRuntime() || this.mm2.isRuntime(); } + @Override public boolean matches(Method method, Class targetClass, Object[] args) { // Because a dynamic intersection may be composed of a static and dynamic part, // we must avoid calling the 3-arg matches method on a dynamic matcher, as
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java
@@ -77,6 +77,7 @@ public NameMatchMethodPointcut addMethodName(String name) { } + @Override public boolean matches(Method method, Class targetClass) { for (String mappedName : this.mappedNames) { if (mappedName.equals(method.getName()) || isMatch(method.getName(), mappedName)) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java
@@ -85,6 +85,7 @@ public NameMatchMethodPointcut addMethodName(String name) { } + @Override public Pointcut getPointcut() { return this.pointcut; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java
@@ -96,6 +96,7 @@ private static class SetterPointcut extends StaticMethodMatcherPointcut implemen public static SetterPointcut INSTANCE = new SetterPointcut(); + @Override public boolean matches(Method method, Class targetClass) { return method.getName().startsWith("set") && method.getParameterTypes().length == 1 && @@ -116,6 +117,7 @@ private static class GetterPointcut extends StaticMethodMatcherPointcut implemen public static GetterPointcut INSTANCE = new GetterPointcut(); + @Override public boolean matches(Method method, Class targetClass) { return method.getName().startsWith("get") && method.getParameterTypes().length == 0;
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java
@@ -116,6 +116,7 @@ public void setPatterns(String[] patterns) { /** * Initialize the singleton Pointcut held within this Advisor. */ + @Override public Pointcut getPointcut() { synchronized (this.pointcutMonitor) { if (this.pointcut == null) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java
@@ -35,6 +35,7 @@ public RootClassFilter(Class clazz) { this.clazz = clazz; } + @Override public boolean matches(Class candidate) { return clazz.isAssignableFrom(candidate); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java
@@ -26,10 +26,12 @@ */ public abstract class StaticMethodMatcher implements MethodMatcher { + @Override public final boolean isRuntime() { return false; } + @Override public final boolean matches(Method method, Class<?> targetClass, Object[] args) { // should never be invoked because isRuntime() returns false throw new UnsupportedOperationException("Illegal MethodMatcher usage");
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcut.java
@@ -43,11 +43,13 @@ public void setClassFilter(ClassFilter classFilter) { this.classFilter = classFilter; } + @Override public ClassFilter getClassFilter() { return this.classFilter; } + @Override public final MethodMatcher getMethodMatcher() { return this; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcherPointcutAdvisor.java
@@ -63,6 +63,7 @@ public void setOrder(int order) { this.order = order; } + @Override public int getOrder() { return this.order; } @@ -71,14 +72,17 @@ public void setAdvice(Advice advice) { this.advice = advice; } + @Override public Advice getAdvice() { return this.advice; } + @Override public boolean isPerInstance() { return true; } + @Override public Pointcut getPointcut() { return this; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java
@@ -59,6 +59,7 @@ public AnnotationClassFilter(Class<? extends Annotation> annotationType, boolean } + @Override public boolean matches(Class clazz) { return (this.checkInherited ? (AnnotationUtils.findAnnotation(clazz, this.annotationType) != null) :
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java
@@ -90,10 +90,12 @@ public AnnotationMatchingPointcut( } + @Override public ClassFilter getClassFilter() { return this.classFilter; } + @Override public MethodMatcher getMethodMatcher() { return this.methodMatcher; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java
@@ -47,6 +47,7 @@ public AnnotationMethodMatcher(Class<? extends Annotation> annotationType) { } + @Override public boolean matches(Method method, Class targetClass) { if (method.isAnnotationPresent(this.annotationType)) { return true;
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java
@@ -105,6 +105,7 @@ public void setTargetClass(Class targetClass) { * Set the owning BeanFactory. We need to save a reference so that we can * use the {@code getBean} method on every invocation. */ + @Override public void setBeanFactory(BeanFactory beanFactory) { if (this.targetBeanName == null) { throw new IllegalStateException("Property'targetBeanName' is required"); @@ -120,6 +121,7 @@ public BeanFactory getBeanFactory() { } + @Override public synchronized Class<?> getTargetClass() { if (this.targetClass == null && this.beanFactory != null) { // Determine type of the target bean. @@ -137,10 +139,12 @@ public synchronized Class<?> getTargetClass() { return this.targetClass; } + @Override public boolean isStatic() { return false; } + @Override public void releaseTarget(Object target) throws Exception { // Nothing to do here. }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java
@@ -64,10 +64,12 @@ public synchronized boolean isInitialized() { * a meaningful value when the target is still {@code null}. * @see #isInitialized() */ + @Override public synchronized Class<?> getTargetClass() { return (this.lazyTarget != null ? this.lazyTarget.getClass() : null); } + @Override public boolean isStatic() { return false; } @@ -77,6 +79,7 @@ public boolean isStatic() { * creating it on-the-fly if it doesn't exist already. * @see #createObject() */ + @Override public synchronized Object getTarget() throws Exception { if (this.lazyTarget == null) { logger.debug("Initializing lazy target object"); @@ -85,6 +88,7 @@ public synchronized Object getTarget() throws Exception { return this.lazyTarget; } + @Override public void releaseTarget(Object target) throws Exception { // nothing to do }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java
@@ -68,6 +68,7 @@ public void setMaxSize(int maxSize) { /** * Return the maximum size of the pool. */ + @Override public int getMaxSize() { return this.maxSize; } @@ -97,6 +98,7 @@ public final void setBeanFactory(BeanFactory beanFactory) throws BeansException * @throws Exception we may need to deal with checked exceptions from pool * APIs, so we're forgiving with our exception signature */ + @Override public abstract Object getTarget() throws Exception; /**
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java
@@ -252,10 +252,12 @@ public void releaseTarget(Object target) throws Exception { this.pool.returnObject(target); } + @Override public int getActiveCount() throws UnsupportedOperationException { return this.pool.getNumActive(); } + @Override public int getIdleCount() throws UnsupportedOperationException { return this.pool.getNumIdle(); } @@ -264,6 +266,7 @@ public int getIdleCount() throws UnsupportedOperationException { /** * Closes the underlying {@code ObjectPool} when destroying this object. */ + @Override public void destroy() throws Exception { logger.debug("Closing Commons ObjectPool"); this.pool.close(); @@ -274,21 +277,26 @@ public void destroy() throws Exception { // Implementation of org.apache.commons.pool.PoolableObjectFactory interface //---------------------------------------------------------------------------- + @Override public Object makeObject() throws BeansException { return newPrototypeInstance(); } + @Override public void destroyObject(Object obj) throws Exception { destroyPrototypeInstance(obj); } + @Override public boolean validateObject(Object obj) { return true; } + @Override public void activateObject(Object obj) { } + @Override public void passivateObject(Object obj) { }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java
@@ -89,27 +89,31 @@ private EmptyTargetSource(Class targetClass, boolean isStatic) { /** * Always returns the specified target Class, or {@code null} if none. */ + @Override public Class<?> getTargetClass() { return this.targetClass; } /** * Always returns {@code true}. */ + @Override public boolean isStatic() { return this.isStatic; } /** * Always returns {@code null}. */ + @Override public Object getTarget() { return null; } /** * Nothing to release. */ + @Override public void releaseTarget(Object target) { }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java
@@ -59,18 +59,22 @@ public HotSwappableTargetSource(Object initialTarget) { * Return the type of the current target object. * <p>The returned type should usually be constant across all target objects. */ + @Override public synchronized Class<?> getTargetClass() { return this.target.getClass(); } + @Override public final boolean isStatic() { return false; } + @Override public synchronized Object getTarget() { return this.target; } + @Override public void releaseTarget(Object target) { // nothing to do }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java
@@ -62,6 +62,7 @@ public class LazyInitTargetSource extends AbstractBeanFactoryBasedTargetSource { private Object target; + @Override public synchronized Object getTarget() throws BeansException { if (this.target == null) { this.target = getBeanFactory().getBean(getTargetBeanName());
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/PrototypeTargetSource.java
@@ -37,6 +37,7 @@ public class PrototypeTargetSource extends AbstractPrototypeBasedTargetSource { * Obtain a new prototype instance for every call. * @see #newPrototypeInstance() */ + @Override public Object getTarget() throws BeansException { return newPrototypeInstance(); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/SimpleBeanTargetSource.java
@@ -30,6 +30,7 @@ @SuppressWarnings("serial") public class SimpleBeanTargetSource extends AbstractBeanFactoryBasedTargetSource { + @Override public Object getTarget() throws Exception { return getBeanFactory().getBean(getTargetBeanName()); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java
@@ -55,18 +55,22 @@ public SingletonTargetSource(Object target) { } + @Override public Class<?> getTargetClass() { return this.target.getClass(); } + @Override public Object getTarget() { return this.target; } + @Override public void releaseTarget(Object target) { // nothing to do } + @Override public boolean isStatic() { return true; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java
@@ -75,6 +75,7 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource * We look for a target held in a ThreadLocal. If we don't find one, * we create one and bind it to the thread. No synchronization is required. */ + @Override public Object getTarget() throws BeansException { ++this.invocationCount; Object target = this.targetInThread.get(); @@ -102,6 +103,7 @@ public Object getTarget() throws BeansException { * Dispose of targets if necessary; clear ThreadLocal. * @see #destroyPrototypeInstance */ + @Override public void destroy() { logger.debug("Destroying ThreadLocalTargetSource bindings"); synchronized (this.targetSet) { @@ -115,14 +117,17 @@ public void destroy() { } + @Override public int getInvocationCount() { return this.invocationCount; } + @Override public int getHitCount() { return this.hitCount; } + @Override public int getObjectCount() { synchronized (this.targetSet) { return this.targetSet.size();
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java
@@ -63,6 +63,7 @@ public void setRefreshCheckDelay(long refreshCheckDelay) { } + @Override public synchronized Class<?> getTargetClass() { if (this.targetObject == null) { refresh(); @@ -73,10 +74,12 @@ public synchronized Class<?> getTargetClass() { /** * Not static. */ + @Override public boolean isStatic() { return false; } + @Override public final synchronized Object getTarget() { if ((refreshCheckDelayElapsed() && requiresRefresh()) || this.targetObject == null) { refresh(); @@ -87,10 +90,12 @@ public final synchronized Object getTarget() { /** * No need to release target. */ + @Override public void releaseTarget(Object object) { } + @Override public final synchronized void refresh() { logger.debug("Attempting to refresh target"); @@ -101,10 +106,12 @@ public final synchronized void refresh() { logger.debug("Target refreshed successfully"); } + @Override public synchronized long getRefreshCount() { return this.refreshCount; } + @Override public synchronized long getLastRefreshTime() { return this.lastRefreshTime; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java
@@ -60,6 +60,7 @@ public Object invoke(MethodInvocation invocation) throws Throwable { @Test public void testToStringDoesntHitTarget() throws Throwable { Object target = new TestBean() { + @Override public String toString() { throw new UnsupportedOperationException("toString"); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java
@@ -184,6 +184,7 @@ public void testIntroductionInterceptorDoesntReplaceToString() throws Exception TimeStamped ts = new SerializableTimeStamped(0); factory.addAdvisor(0, new DefaultIntroductionAdvisor(new DelegatingIntroductionInterceptor(ts) { + @Override public String toString() { throw new UnsupportedOperationException("Shouldn't be invoked"); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/test/java/org/springframework/tests/aop/advice/MethodCounter.java
@@ -59,10 +59,12 @@ public int getCalls() { * Doesn't worry about counts. * @see java.lang.Object#equals(java.lang.Object) */ + @Override public boolean equals(Object other) { return (other != null && other.getClass() == this.getClass()); } + @Override public int hashCode() { return getClass().hashCode(); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/test/java/org/springframework/tests/aop/interceptor/NopInterceptor.java
@@ -46,6 +46,7 @@ protected void increment() { ++count; } + @Override public boolean equals(Object other) { if (!(other instanceof NopInterceptor)) { return false;
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aop/src/test/java/org/springframework/tests/sample/beans/SerializablePerson.java
@@ -59,6 +59,7 @@ public Object echo(Object o) throws Throwable { return o; } + @Override public boolean equals(Object other) { if (!(other instanceof SerializablePerson)) { return false;
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerTests.java
@@ -416,14 +416,17 @@ public CircularFactoryBean() { assertNull(autowired.getRamnivas()); } + @Override public Object getObject() throws Exception { return new TestBean(); } + @Override public Class getObjectType() { return TestBean.class; } + @Override public boolean isSingleton() { return false; } @@ -559,6 +562,7 @@ public static class PricingStrategy { public static class LineItem implements PricingStrategyClient { private PricingStrategy pricingStrategy; + @Override public void setPricingStrategy(PricingStrategy pricingStrategy) { this.pricingStrategy = pricingStrategy; } @@ -568,6 +572,7 @@ public void setPricingStrategy(PricingStrategy pricingStrategy) { public static class Order implements MailSenderClient, Serializable { private transient MailSender mailSender; + @Override public void setMailSender(MailSender mailSender) { this.mailSender = mailSender; } @@ -577,10 +582,12 @@ public static class ShoppingCart implements MailSenderClient, PaymentProcessorCl private transient MailSender mailSender; private transient PaymentProcessor paymentProcessor; + @Override public void setMailSender(MailSender mailSender) { this.mailSender = mailSender; } + @Override public void setPaymentProcessor(PaymentProcessor paymentProcessor) { this.paymentProcessor = paymentProcessor; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJAnnotationTests.java
@@ -46,6 +46,7 @@ public void testKeyStrategy() throws Exception { Assert.assertSame(ctx.getBean("keyGenerator"), aspect.getKeyGenerator()); } + @Override public void testMultiEvict(CacheableService<?> service) { Object o1 = new Object();
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java
@@ -33,109 +33,132 @@ public class AnnotatedClassCacheableService implements CacheableService<Object> private final AtomicLong counter = new AtomicLong(); public static final AtomicLong nullInvocations = new AtomicLong(); + @Override public Object cache(Object arg1) { return counter.getAndIncrement(); } + @Override public Object conditional(int field) { return null; } + @Override public Object unless(int arg) { return arg; } + @Override @CacheEvict("default") public void invalidate(Object arg1) { } + @Override @CacheEvict("default") public void evictWithException(Object arg1) { throw new RuntimeException("exception thrown - evict should NOT occur"); } + @Override @CacheEvict(value = "default", allEntries = true) public void evictAll(Object arg1) { } + @Override @CacheEvict(value = "default", beforeInvocation = true) public void evictEarly(Object arg1) { throw new RuntimeException("exception thrown - evict should still occur"); } + @Override @CacheEvict(value = "default", key = "#p0") public void evict(Object arg1, Object arg2) { } + @Override @CacheEvict(value = "default", key = "#p0", beforeInvocation = true) public void invalidateEarly(Object arg1, Object arg2) { throw new RuntimeException("exception thrown - evict should still occur"); } + @Override @Cacheable(value = "default", key = "#p0") public Object key(Object arg1, Object arg2) { return counter.getAndIncrement(); } + @Override @Cacheable(value = "default", key = "#root.methodName + #root.caches[0].name") public Object name(Object arg1) { return counter.getAndIncrement(); } + @Override @Cacheable(value = "default", key = "#root.methodName + #root.method.name + #root.targetClass + #root.target") public Object rootVars(Object arg1) { return counter.getAndIncrement(); } + @Override @CachePut("default") public Object update(Object arg1) { return counter.getAndIncrement(); } + @Override @CachePut(value = "default", condition = "#arg.equals(3)") public Object conditionalUpdate(Object arg) { return arg; } + @Override public Object nullValue(Object arg1) { nullInvocations.incrementAndGet(); return null; } + @Override public Number nullInvocations() { return nullInvocations.get(); } + @Override public Long throwChecked(Object arg1) throws Exception { throw new UnsupportedOperationException(arg1.toString()); } + @Override public Long throwUnchecked(Object arg1) { throw new UnsupportedOperationException(); } // multi annotations + @Override @Caching(cacheable = { @Cacheable("primary"), @Cacheable("secondary") }) public Object multiCache(Object arg1) { return counter.getAndIncrement(); } + @Override @Caching(evict = { @CacheEvict("primary"), @CacheEvict(value = "secondary", key = "#p0") }) public Object multiEvict(Object arg1) { return counter.getAndIncrement(); } + @Override @Caching(cacheable = { @Cacheable(value = "primary", key = "#root.methodName") }, evict = { @CacheEvict("secondary") }) public Object multiCacheAndEvict(Object arg1) { return counter.getAndIncrement(); } + @Override @Caching(cacheable = { @Cacheable(value = "primary", condition = "#p0 == 3") }, evict = { @CacheEvict("secondary") }) public Object multiConditionalCacheAndEvict(Object arg1) { return counter.getAndIncrement(); } + @Override @Caching(put = { @CachePut("primary"), @CachePut("secondary") }) public Object multiUpdate(Object arg1) { return arg1;
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java
@@ -125,6 +125,7 @@ public void testDefaultCommitOnAnnotatedClass() throws Throwable { final Exception ex = new Exception(); try { testRollback(new TransactionOperationCallback() { + @Override public Object performTransactionalOperation() throws Throwable { return annotationOnlyOnClassWithNoInterface.echo(ex); } @@ -140,6 +141,7 @@ public void testDefaultRollbackOnAnnotatedClass() throws Throwable { final RuntimeException ex = new RuntimeException(); try { testRollback(new TransactionOperationCallback() { + @Override public Object performTransactionalOperation() throws Throwable { return annotationOnlyOnClassWithNoInterface.echo(ex); } @@ -156,6 +158,7 @@ public void testDefaultCommitOnSubclassOfAnnotatedClass() throws Throwable { final Exception ex = new Exception(); try { testRollback(new TransactionOperationCallback() { + @Override public Object performTransactionalOperation() throws Throwable { return new SubclassOfClassWithTransactionalAnnotation().echo(ex); } @@ -171,6 +174,7 @@ public void testDefaultCommitOnSubclassOfClassWithTransactionalMethodAnnotated() final Exception ex = new Exception(); try { testRollback(new TransactionOperationCallback() { + @Override public Object performTransactionalOperation() throws Throwable { return new SubclassOfClassWithTransactionalMethodAnnotation().echo(ex); } @@ -191,6 +195,7 @@ public void testDefaultCommitOnImplementationOfAnnotatedInterface() throws Throw final Exception ex = new Exception(); testNotTransactional(new TransactionOperationCallback() { + @Override public Object performTransactionalOperation() throws Throwable { return new ImplementsAnnotatedInterface().echo(ex); } @@ -221,6 +226,7 @@ public void testDefaultRollbackOnImplementationOfAnnotatedInterface() throws Thr final Exception rollbackProvokingException = new RuntimeException(); testNotTransactional(new TransactionOperationCallback() { + @Override public Object performTransactionalOperation() throws Throwable { return new ImplementsAnnotatedInterface().echo(rollbackProvokingException); } @@ -275,6 +281,7 @@ public static class SubclassOfClassWithTransactionalMethodAnnotation extends Met public static class ImplementsAnnotatedInterface implements ITransactional { + @Override public Object echo(Throwable t) throws Throwable { if (t != null) { throw t;
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java
@@ -36,31 +36,38 @@ public abstract class AbstractPropertyAccessor extends TypeConverterSupport impl private boolean extractOldValueForEditor = false; + @Override public void setExtractOldValueForEditor(boolean extractOldValueForEditor) { this.extractOldValueForEditor = extractOldValueForEditor; } + @Override public boolean isExtractOldValueForEditor() { return this.extractOldValueForEditor; } + @Override public void setPropertyValue(PropertyValue pv) throws BeansException { setPropertyValue(pv.getName(), pv.getValue()); } + @Override public void setPropertyValues(Map<?, ?> map) throws BeansException { setPropertyValues(new MutablePropertyValues(map)); } + @Override public void setPropertyValues(PropertyValues pvs) throws BeansException { setPropertyValues(pvs, false, false); } + @Override public void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown) throws BeansException { setPropertyValues(pvs, ignoreUnknown, false); } + @Override public void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown, boolean ignoreInvalid) throws BeansException { @@ -118,6 +125,7 @@ public Class getPropertyType(String propertyPath) { * @throws PropertyAccessException if the property was valid but the * accessor method failed */ + @Override public abstract Object getPropertyValue(String propertyName) throws BeansException; /** @@ -129,6 +137,7 @@ public Class getPropertyType(String propertyPath) { * @throws PropertyAccessException if the property was valid but the * accessor method failed or a type mismatch occured */ + @Override public abstract void setPropertyValue(String propertyName, Object value) throws BeansException; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java
@@ -69,6 +69,7 @@ public void setSource(Object source) { this.source = source; } + @Override public Object getSource() { return this.source; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java
@@ -40,6 +40,7 @@ public void setSource(Object source) { this.source = source; } + @Override public Object getSource() { return this.source; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
@@ -219,10 +219,12 @@ public void setWrappedInstance(Object object, String nestedPath, Object rootObje setIntrospectionClass(object.getClass()); } + @Override public final Object getWrappedInstance() { return this.object; } + @Override public final Class getWrappedClass() { return (this.object != null ? this.object.getClass() : null); } @@ -257,13 +259,15 @@ public final Class getRootClass() { * enables auto-growth of collection elements when accessing an out-of-bounds index. * <p>Default is "false" on a plain BeanWrapper. */ + @Override public void setAutoGrowNestedPaths(boolean autoGrowNestedPaths) { this.autoGrowNestedPaths = autoGrowNestedPaths; } /** * Return whether "auto-growing" of nested paths has been activated. */ + @Override public boolean isAutoGrowNestedPaths() { return this.autoGrowNestedPaths; } @@ -272,13 +276,15 @@ public boolean isAutoGrowNestedPaths() { * Specify a limit for array and collection auto-growing. * <p>Default is unlimited on a plain BeanWrapper. */ + @Override public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) { this.autoGrowCollectionLimit = autoGrowCollectionLimit; } /** * Return the limit for array and collection auto-growing. */ + @Override public int getAutoGrowCollectionLimit() { return this.autoGrowCollectionLimit; } @@ -324,10 +330,12 @@ private CachedIntrospectionResults getCachedIntrospectionResults() { } + @Override public PropertyDescriptor[] getPropertyDescriptors() { return getCachedIntrospectionResults().getPropertyDescriptors(); } + @Override public PropertyDescriptor getPropertyDescriptor(String propertyName) throws BeansException { PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName); if (pd == null) { @@ -378,6 +386,7 @@ public Class getPropertyType(String propertyName) throws BeansException { return null; } + @Override public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException { try { BeanWrapperImpl nestedBw = getBeanWrapperForPropertyPath(propertyName); @@ -402,6 +411,7 @@ public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws Bean return null; } + @Override public boolean isReadableProperty(String propertyName) { try { PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName); @@ -422,6 +432,7 @@ public boolean isReadableProperty(String propertyName) { return false; } + @Override public boolean isWritableProperty(String propertyName) { try { PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName); @@ -711,6 +722,7 @@ private Object getPropertyValue(PropertyTokenHolder tokens) throws BeansExceptio if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers()) && !readMethod.isAccessible()) { if (System.getSecurityManager() != null) { AccessController.doPrivileged(new PrivilegedAction<Object>() { + @Override public Object run() { readMethod.setAccessible(true); return null; @@ -726,6 +738,7 @@ public Object run() { if (System.getSecurityManager() != null) { try { value = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { + @Override public Object run() throws Exception { return readMethod.invoke(object, (Object[]) null); } @@ -1062,6 +1075,7 @@ else if (propValue instanceof Map) { !readMethod.isAccessible()) { if (System.getSecurityManager()!= null) { AccessController.doPrivileged(new PrivilegedAction<Object>() { + @Override public Object run() { readMethod.setAccessible(true); return null; @@ -1075,6 +1089,7 @@ public Object run() { try { if (System.getSecurityManager() != null) { oldValue = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { + @Override public Object run() throws Exception { return readMethod.invoke(object); } @@ -1104,6 +1119,7 @@ public Object run() throws Exception { if (!Modifier.isPublic(writeMethod.getDeclaringClass().getModifiers()) && !writeMethod.isAccessible()) { if (System.getSecurityManager()!= null) { AccessController.doPrivileged(new PrivilegedAction<Object>() { + @Override public Object run() { writeMethod.setAccessible(true); return null; @@ -1118,6 +1134,7 @@ public Object run() { if (System.getSecurityManager() != null) { try { AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { + @Override public Object run() throws Exception { writeMethod.invoke(object, value); return null;
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java
@@ -59,6 +59,7 @@ public DirectFieldAccessor(final Object target) { Assert.notNull(target, "Target object must not be null"); this.target = target; ReflectionUtils.doWithFields(this.target.getClass(), new ReflectionUtils.FieldCallback() { + @Override public void doWith(Field field) { if (fieldMap.containsKey(field.getName())) { // ignore superclass declarations of fields already found in a subclass @@ -74,10 +75,12 @@ public void doWith(Field field) { } + @Override public boolean isReadableProperty(String propertyName) throws BeansException { return this.fieldMap.containsKey(propertyName); } + @Override public boolean isWritableProperty(String propertyName) throws BeansException { return this.fieldMap.containsKey(propertyName); } @@ -91,6 +94,7 @@ public Class<?> getPropertyType(String propertyName) throws BeansException { return null; } + @Override public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException { Field field = this.fieldMap.get(propertyName); if (field != null) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java
@@ -121,6 +121,7 @@ private List<Method> findCandidateWriteMethods(MethodDescriptor[] methodDescript // non-deterministic sorting of methods returned from Class#getDeclaredMethods // under JDK 7. See http://bugs.sun.com/view_bug.do?bug_id=7023180 Collections.sort(matches, new Comparator<Method>() { + @Override public int compare(Method m1, Method m2) { return m2.toString().compareTo(m1.toString()); } @@ -220,35 +221,43 @@ private String propertyNameFor(Method method) { * method found during construction. * @see #ExtendedBeanInfo(BeanInfo) */ + @Override public PropertyDescriptor[] getPropertyDescriptors() { return this.propertyDescriptors.toArray( new PropertyDescriptor[this.propertyDescriptors.size()]); } + @Override public BeanInfo[] getAdditionalBeanInfo() { return delegate.getAdditionalBeanInfo(); } + @Override public BeanDescriptor getBeanDescriptor() { return delegate.getBeanDescriptor(); } + @Override public int getDefaultEventIndex() { return delegate.getDefaultEventIndex(); } + @Override public int getDefaultPropertyIndex() { return delegate.getDefaultPropertyIndex(); } + @Override public EventSetDescriptor[] getEventSetDescriptors() { return delegate.getEventSetDescriptors(); } + @Override public Image getIcon(int iconKind) { return delegate.getIcon(iconKind); } + @Override public MethodDescriptor[] getMethodDescriptors() { return delegate.getMethodDescriptors(); } @@ -658,6 +667,7 @@ public static boolean compareMethods(Method a, Method b) { */ class PropertyDescriptorComparator implements Comparator<PropertyDescriptor> { + @Override public int compare(PropertyDescriptor desc1, PropertyDescriptor desc2) { String left = desc1.getName(); String right = desc2.getName();
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfoFactory.java
@@ -40,6 +40,7 @@ public class ExtendedBeanInfoFactory implements Ordered, BeanInfoFactory { /** * Return a new {@link ExtendedBeanInfo} for the given bean class. */ + @Override public BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException { return supports(beanClass) ? new ExtendedBeanInfo(Introspector.getBeanInfo(beanClass)) : null; @@ -58,6 +59,7 @@ private boolean supports(Class<?> beanClass) { return false; } + @Override public int getOrder() { return Ordered.LOWEST_PRECEDENCE; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java
@@ -42,6 +42,7 @@ public MethodInvocationException(PropertyChangeEvent propertyChangeEvent, Throwa super(propertyChangeEvent, "Property '" + propertyChangeEvent.getPropertyName() + "' threw exception", cause); } + @Override public String getErrorCode() { return ERROR_CODE; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java
@@ -244,10 +244,12 @@ public void removePropertyValue(String propertyName) { } + @Override public PropertyValue[] getPropertyValues() { return this.propertyValueList.toArray(new PropertyValue[this.propertyValueList.size()]); } + @Override public PropertyValue getPropertyValue(String propertyName) { for (PropertyValue pv : this.propertyValueList) { if (pv.getName().equals(propertyName)) { @@ -257,6 +259,7 @@ public PropertyValue getPropertyValue(String propertyName) { return null; } + @Override public PropertyValues changesSince(PropertyValues old) { MutablePropertyValues changes = new MutablePropertyValues(); if (old == this) { @@ -278,11 +281,13 @@ else if (!pvOld.equals(newPv)) { return changes; } + @Override public boolean contains(String propertyName) { return (getPropertyValue(propertyName) != null || (this.processedProperties != null && this.processedProperties.contains(propertyName))); } + @Override public boolean isEmpty() { return this.propertyValueList.isEmpty(); }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java
@@ -266,10 +266,12 @@ protected void copyDefaultEditorsTo(PropertyEditorRegistrySupport target) { // Management of custom editors //--------------------------------------------------------------------- + @Override public void registerCustomEditor(Class<?> requiredType, PropertyEditor propertyEditor) { registerCustomEditor(requiredType, null, propertyEditor); } + @Override public void registerCustomEditor(Class<?> requiredType, String propertyPath, PropertyEditor propertyEditor) { if (requiredType == null && propertyPath == null) { throw new IllegalArgumentException("Either requiredType or propertyPath is required"); @@ -289,6 +291,7 @@ public void registerCustomEditor(Class<?> requiredType, String propertyPath, Pro } } + @Override public PropertyEditor findCustomEditor(Class<?> requiredType, String propertyPath) { Class<?> requiredTypeToUse = requiredType; if (propertyPath != null) {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/TypeConverterSupport.java
@@ -35,16 +35,19 @@ public abstract class TypeConverterSupport extends PropertyEditorRegistrySupport TypeConverterDelegate typeConverterDelegate; + @Override public <T> T convertIfNecessary(Object value, Class<T> requiredType) throws TypeMismatchException { return doConvert(value, requiredType, null, null); } + @Override public <T> T convertIfNecessary(Object value, Class<T> requiredType, MethodParameter methodParam) throws TypeMismatchException { return doConvert(value, requiredType, methodParam, null); } + @Override public <T> T convertIfNecessary(Object value, Class<T> requiredType, Field field) throws TypeMismatchException {
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java
@@ -107,6 +107,7 @@ public Class getRequiredType() { return this.requiredType; } + @Override public String getErrorCode() { return ERROR_CODE; }
true
Other
spring-projects
spring-framework
94685481162a93666fc2f39b66223833a6bcb418.json
Add @Override to remaining source files Issue: SPR-10130
spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java
@@ -349,6 +349,7 @@ protected SingletonBeanFactoryLocator(String resourceLocation) { this.resourceLocation = resourceLocation; } + @Override public BeanFactoryReference useBeanFactory(String factoryKey) throws BeansException { synchronized (this.bfgInstancesByKey) { BeanFactoryGroup bfg = this.bfgInstancesByKey.get(this.resourceLocation); @@ -500,11 +501,13 @@ public CountingBeanFactoryReference(BeanFactory beanFactory, BeanFactory groupCo this.groupContextRef = groupContext; } + @Override public BeanFactory getFactory() { return this.beanFactory; } // Note that it's legal to call release more than once! + @Override public void release() throws FatalBeanException { synchronized (bfgInstancesByKey) { BeanFactory savedRef = this.groupContextRef;
true