Always use 'this.' when accessing fields
Ensure that `this.` is used consistently when accessing class fields. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
eeebd51f57
commit
0b53c1096a
@@ -76,7 +76,7 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor {
|
||||
|
||||
// Excludes methods implemented.
|
||||
ClassFilter typePatternFilter = new TypePatternClassFilter(typePattern);
|
||||
ClassFilter exclusion = (clazz -> !introducedInterface.isAssignableFrom(clazz));
|
||||
ClassFilter exclusion = (clazz -> !this.introducedInterface.isAssignableFrom(clazz));
|
||||
this.typePatternClassFilter = ClassFilters.intersection(typePatternFilter, exclusion);
|
||||
}
|
||||
|
||||
|
||||
@@ -651,7 +651,7 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
|
||||
}
|
||||
|
||||
public String getBeanName() {
|
||||
return beanName;
|
||||
return this.beanName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -128,7 +128,7 @@ public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor
|
||||
this.pointcut.setPatterns(this.patterns);
|
||||
}
|
||||
}
|
||||
return pointcut;
|
||||
return this.pointcut;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class RootClassFilter implements ClassFilter, Serializable {
|
||||
|
||||
@Override
|
||||
public boolean matches(Class<?> candidate) {
|
||||
return clazz.isAssignableFrom(candidate);
|
||||
return this.clazz.isAssignableFrom(candidate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ public class BeanWrapperImpl extends AbstractNestablePropertyAccessor implements
|
||||
@Override
|
||||
@Nullable
|
||||
public TypeDescriptor nested(int level) {
|
||||
return TypeDescriptor.nested(property(pd), level);
|
||||
return TypeDescriptor.nested(property(this.pd), level);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -60,14 +60,14 @@ public class InvalidPropertyException extends FatalBeanException {
|
||||
* Return the offending bean class.
|
||||
*/
|
||||
public Class<?> getBeanClass() {
|
||||
return beanClass;
|
||||
return this.beanClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name of the offending property.
|
||||
*/
|
||||
public String getPropertyName() {
|
||||
return propertyName;
|
||||
return this.propertyName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -245,10 +245,10 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
|
||||
ReflectionUtils.doWithMethods(beanClass, method -> {
|
||||
Lookup lookup = method.getAnnotation(Lookup.class);
|
||||
if (lookup != null) {
|
||||
Assert.state(beanFactory != null, "No BeanFactory available");
|
||||
Assert.state(this.beanFactory != null, "No BeanFactory available");
|
||||
LookupOverride override = new LookupOverride(method, lookup.value());
|
||||
try {
|
||||
RootBeanDefinition mbd = (RootBeanDefinition) beanFactory.getMergedBeanDefinition(beanName);
|
||||
RootBeanDefinition mbd = (RootBeanDefinition) this.beanFactory.getMergedBeanDefinition(beanName);
|
||||
mbd.getMethodOverrides().addOverride(override);
|
||||
}
|
||||
catch (NoSuchBeanDefinitionException ex) {
|
||||
@@ -541,7 +541,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
|
||||
private Object resolvedCachedArgument(@Nullable String beanName, @Nullable Object cachedArgument) {
|
||||
if (cachedArgument instanceof DependencyDescriptor) {
|
||||
DependencyDescriptor descriptor = (DependencyDescriptor) cachedArgument;
|
||||
Assert.state(beanFactory != null, "No BeanFactory available");
|
||||
Assert.state(this.beanFactory != null, "No BeanFactory available");
|
||||
return this.beanFactory.resolveDependency(descriptor, beanName, null, null);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -205,14 +205,14 @@ public class InitDestroyAnnotationBeanPostProcessor
|
||||
final LinkedList<LifecycleElement> currDestroyMethods = new LinkedList<>();
|
||||
|
||||
ReflectionUtils.doWithLocalMethods(targetClass, method -> {
|
||||
if (initAnnotationType != null && method.isAnnotationPresent(initAnnotationType)) {
|
||||
if (this.initAnnotationType != null && method.isAnnotationPresent(this.initAnnotationType)) {
|
||||
LifecycleElement element = new LifecycleElement(method);
|
||||
currInitMethods.add(element);
|
||||
if (debug) {
|
||||
logger.debug("Found init method on class [" + clazz.getName() + "]: " + method);
|
||||
}
|
||||
}
|
||||
if (destroyAnnotationType != null && method.isAnnotationPresent(destroyAnnotationType)) {
|
||||
if (this.destroyAnnotationType != null && method.isAnnotationPresent(this.destroyAnnotationType)) {
|
||||
currDestroyMethods.add(new LifecycleElement(method));
|
||||
if (debug) {
|
||||
logger.debug("Found destroy method on class [" + clazz.getName() + "]: " + method);
|
||||
|
||||
@@ -97,7 +97,7 @@ public class FieldRetrievingFactoryBean
|
||||
*/
|
||||
@Nullable
|
||||
public Class<?> getTargetClass() {
|
||||
return targetClass;
|
||||
return this.targetClass;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -261,7 +261,8 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
|
||||
@Override
|
||||
@Nullable
|
||||
public String resolvePlaceholder(String placeholderName) {
|
||||
return PropertyPlaceholderConfigurer.this.resolvePlaceholder(placeholderName, props, systemPropertiesMode);
|
||||
return PropertyPlaceholderConfigurer.this.resolvePlaceholder(placeholderName,
|
||||
this.props, systemPropertiesMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -512,7 +512,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
||||
}
|
||||
else {
|
||||
List constructorArgs = resolveConstructorArguments(args, 0, hasClosureArgument ? args.length - 1 : args.length);
|
||||
currentBeanDefinition = new GroovyBeanDefinitionWrapper(beanName, null, constructorArgs);
|
||||
this.currentBeanDefinition = new GroovyBeanDefinitionWrapper(beanName, null, constructorArgs);
|
||||
}
|
||||
|
||||
if (hasClosureArgument) {
|
||||
|
||||
@@ -470,7 +470,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
|
||||
*/
|
||||
@Override
|
||||
public boolean isSingleton() {
|
||||
return SCOPE_SINGLETON.equals(scope) || SCOPE_DEFAULT.equals(scope);
|
||||
return SCOPE_SINGLETON.equals(this.scope) || SCOPE_DEFAULT.equals(this.scope);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -480,7 +480,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
|
||||
*/
|
||||
@Override
|
||||
public boolean isPrototype() {
|
||||
return SCOPE_PROTOTYPE.equals(scope);
|
||||
return SCOPE_PROTOTYPE.equals(this.scope);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -275,7 +275,7 @@ public final class BeanDefinitionBuilder {
|
||||
* Set the autowire mode for this definition.
|
||||
*/
|
||||
public BeanDefinitionBuilder setAutowireMode(int autowireMode) {
|
||||
beanDefinition.setAutowireMode(autowireMode);
|
||||
this.beanDefinition.setAutowireMode(autowireMode);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ public final class BeanDefinitionBuilder {
|
||||
* Set the depency check mode for this definition.
|
||||
*/
|
||||
public BeanDefinitionBuilder setDependencyCheck(int dependencyCheck) {
|
||||
beanDefinition.setDependencyCheck(dependencyCheck);
|
||||
this.beanDefinition.setDependencyCheck(dependencyCheck);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ public final class BeanDefinitionBuilder {
|
||||
*/
|
||||
public BeanDefinitionBuilder applyCustomizers(BeanDefinitionCustomizer... customizers) {
|
||||
for (BeanDefinitionCustomizer customizer : customizers) {
|
||||
customizer.customize(beanDefinition);
|
||||
customizer.customize(this.beanDefinition);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -261,15 +261,15 @@ class ConstructorResolver {
|
||||
}
|
||||
|
||||
try {
|
||||
final InstantiationStrategy strategy = beanFactory.getInstantiationStrategy();
|
||||
final InstantiationStrategy strategy = this.beanFactory.getInstantiationStrategy();
|
||||
Object beanInstance;
|
||||
|
||||
if (System.getSecurityManager() != null) {
|
||||
final Constructor<?> ctorToUse = constructorToUse;
|
||||
final Object[] argumentsToUse = argsToUse;
|
||||
beanInstance = AccessController.doPrivileged((PrivilegedAction<Object>) () ->
|
||||
strategy.instantiate(mbd, beanName, beanFactory, ctorToUse, argumentsToUse),
|
||||
beanFactory.getAccessControlContext());
|
||||
strategy.instantiate(mbd, beanName, this.beanFactory, ctorToUse, argumentsToUse),
|
||||
this.beanFactory.getAccessControlContext());
|
||||
}
|
||||
else {
|
||||
beanInstance = strategy.instantiate(mbd, beanName, this.beanFactory, constructorToUse, argsToUse);
|
||||
@@ -575,8 +575,8 @@ class ConstructorResolver {
|
||||
final Method factoryMethod = factoryMethodToUse;
|
||||
final Object[] args = argsToUse;
|
||||
beanInstance = AccessController.doPrivileged((PrivilegedAction<Object>) () ->
|
||||
beanFactory.getInstantiationStrategy().instantiate(mbd, beanName, beanFactory, fb, factoryMethod, args),
|
||||
beanFactory.getAccessControlContext());
|
||||
this.beanFactory.getInstantiationStrategy().instantiate(mbd, beanName, this.beanFactory, fb, factoryMethod, args),
|
||||
this.beanFactory.getAccessControlContext());
|
||||
}
|
||||
else {
|
||||
beanInstance = this.beanFactory.getInstantiationStrategy().instantiate(
|
||||
|
||||
@@ -1656,7 +1656,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
||||
return createOptionalDependency(this.descriptor, this.beanName, args);
|
||||
}
|
||||
else {
|
||||
DependencyDescriptor descriptorToUse = new DependencyDescriptor(descriptor) {
|
||||
DependencyDescriptor descriptorToUse = new DependencyDescriptor(this.descriptor) {
|
||||
@Override
|
||||
public Object resolveCandidate(String beanName, Class<?> requiredType, BeanFactory beanFactory) {
|
||||
return beanFactory.getBean(beanName, args);
|
||||
@@ -1677,7 +1677,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
||||
return createOptionalDependency(this.descriptor, this.beanName);
|
||||
}
|
||||
else {
|
||||
DependencyDescriptor descriptorToUse = new DependencyDescriptor(descriptor) {
|
||||
DependencyDescriptor descriptorToUse = new DependencyDescriptor(this.descriptor) {
|
||||
@Override
|
||||
public boolean isRequired() {
|
||||
return false;
|
||||
@@ -1690,7 +1690,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getIfUnique() throws BeansException {
|
||||
DependencyDescriptor descriptorToUse = new DependencyDescriptor(descriptor) {
|
||||
DependencyDescriptor descriptorToUse = new DependencyDescriptor(this.descriptor) {
|
||||
@Override
|
||||
public boolean isRequired() {
|
||||
return false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -248,12 +248,12 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
|
||||
try {
|
||||
if (System.getSecurityManager() != null) {
|
||||
AccessController.doPrivileged((PrivilegedExceptionAction<Object>) () -> {
|
||||
((DisposableBean) bean).destroy();
|
||||
((DisposableBean) this.bean).destroy();
|
||||
return null;
|
||||
}, acc);
|
||||
}, this.acc);
|
||||
}
|
||||
else {
|
||||
((DisposableBean) bean).destroy();
|
||||
((DisposableBean) this.bean).destroy();
|
||||
}
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
@@ -326,7 +326,7 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
|
||||
});
|
||||
try {
|
||||
AccessController.doPrivileged((PrivilegedExceptionAction<Object>) () ->
|
||||
destroyMethod.invoke(bean, args), acc);
|
||||
destroyMethod.invoke(this.bean, args), this.acc);
|
||||
}
|
||||
catch (PrivilegedActionException pax) {
|
||||
throw (InvocationTargetException) pax.getException();
|
||||
@@ -334,7 +334,7 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
|
||||
}
|
||||
else {
|
||||
ReflectionUtils.makeAccessible(destroyMethod);
|
||||
destroyMethod.invoke(bean, args);
|
||||
destroyMethod.invoke(this.bean, args);
|
||||
}
|
||||
}
|
||||
catch (InvocationTargetException ex) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -56,7 +56,7 @@ public class SimpleSecurityContextProvider implements SecurityContextProvider {
|
||||
|
||||
@Override
|
||||
public AccessControlContext getAccessControlContext() {
|
||||
return (this.acc != null ? acc : AccessController.getContext());
|
||||
return (this.acc != null ? this.acc : AccessController.getContext());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class StringArrayPropertyEditor extends PropertyEditorSupport {
|
||||
@Override
|
||||
public void setAsText(String text) throws IllegalArgumentException {
|
||||
String[] array = StringUtils.delimitedListToStringArray(text, this.separator, this.charsToDelete);
|
||||
if (trimValues) {
|
||||
if (this.trimValues) {
|
||||
array = StringUtils.trimArrayElements(array);
|
||||
}
|
||||
if (this.emptyArrayAsNull && array.length == 0) {
|
||||
|
||||
@@ -159,10 +159,10 @@ public class CaffeineCache extends AbstractValueAdaptingCache {
|
||||
@Override
|
||||
public Object apply(Object o) {
|
||||
try {
|
||||
return toStoreValue(valueLoader.call());
|
||||
return toStoreValue(this.valueLoader.call());
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new ValueRetrievalException(o, valueLoader, ex);
|
||||
throw new ValueRetrievalException(o, this.valueLoader, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class CacheResolverAdapter implements CacheResolver {
|
||||
* that this instance is using.
|
||||
*/
|
||||
protected javax.cache.annotation.CacheResolver getTarget() {
|
||||
return target;
|
||||
return this.target;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,12 +48,12 @@ class DefaultCacheKeyInvocationContext<A extends Annotation>
|
||||
|
||||
@Override
|
||||
public CacheInvocationParameter[] getKeyParameters() {
|
||||
return keyParameters.clone();
|
||||
return this.keyParameters.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CacheInvocationParameter getValueParameter() {
|
||||
return valueParameter;
|
||||
return this.valueParameter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class FreeMarkerConfigurationFactory {
|
||||
* @see #setTemplateLoaderPath
|
||||
*/
|
||||
public void setConfigLocation(Resource resource) {
|
||||
configLocation = resource;
|
||||
this.configLocation = resource;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -369,7 +369,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
if (Modifier.isStatic(field.getModifiers())) {
|
||||
throw new IllegalStateException("@Resource annotation is not supported on static fields");
|
||||
}
|
||||
if (!ignoredResourceTypes.contains(field.getType().getName())) {
|
||||
if (!this.ignoredResourceTypes.contains(field.getType().getName())) {
|
||||
currElements.add(new ResourceElement(field, field, null));
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
if (paramTypes.length != 1) {
|
||||
throw new IllegalStateException("@Resource annotation requires a single-arg method: " + method);
|
||||
}
|
||||
if (!ignoredResourceTypes.contains(paramTypes[0].getName())) {
|
||||
if (!this.ignoredResourceTypes.contains(paramTypes[0].getName())) {
|
||||
PropertyDescriptor pd = BeanUtils.findPropertyForMethod(bridgedMethod, clazz);
|
||||
currElements.add(new ResourceElement(method, bridgedMethod, pd));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,7 +35,7 @@ public class DefaultEventListenerFactory implements EventListenerFactory, Ordere
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return order;
|
||||
return this.order;
|
||||
}
|
||||
|
||||
public void setOrder(int order) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,11 +36,11 @@ class EventExpressionRootObject {
|
||||
}
|
||||
|
||||
public ApplicationEvent getEvent() {
|
||||
return event;
|
||||
return this.event;
|
||||
}
|
||||
|
||||
public Object[] getArgs() {
|
||||
return args;
|
||||
return this.args;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -170,13 +170,13 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
|
||||
propertyResolver.setValueSeparator(this.valueSeparator);
|
||||
|
||||
StringValueResolver valueResolver = strVal -> {
|
||||
String resolved = (ignoreUnresolvablePlaceholders ?
|
||||
String resolved = (this.ignoreUnresolvablePlaceholders ?
|
||||
propertyResolver.resolvePlaceholders(strVal) :
|
||||
propertyResolver.resolveRequiredPlaceholders(strVal));
|
||||
if (trimValues) {
|
||||
if (this.trimValues) {
|
||||
resolved = resolved.trim();
|
||||
}
|
||||
return (resolved.equals(nullValue) ? null : resolved);
|
||||
return (resolved.equals(this.nullValue) ? null : resolved);
|
||||
};
|
||||
|
||||
doProcessProperties(beanFactoryToProcess, valueResolver);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -293,7 +293,7 @@ public class FormattingConversionService extends GenericConversionService
|
||||
|
||||
@Override
|
||||
public Set<ConvertiblePair> getConvertibleTypes() {
|
||||
return Collections.singleton(new ConvertiblePair(String.class, fieldType));
|
||||
return Collections.singleton(new ConvertiblePair(String.class, this.fieldType));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -83,7 +83,7 @@ class WebSphereClassPreDefinePlugin implements InvocationHandler {
|
||||
throws Exception {
|
||||
|
||||
// NB: WebSphere passes className as "." without class while the transformer expects a VM "/" format
|
||||
byte[] result = transformer.transform(classLoader, className.replace('.', '/'), null, null, classfileBuffer);
|
||||
byte[] result = this.transformer.transform(classLoader, className.replace('.', '/'), null, null, classfileBuffer);
|
||||
return (result != null ? result : classfileBuffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -250,12 +250,12 @@ public class ScheduledAnnotationBeanPostProcessor
|
||||
Assert.state(this.beanFactory != null, "BeanFactory must be set to find scheduler by type");
|
||||
try {
|
||||
// Search for TaskScheduler bean...
|
||||
this.registrar.setTaskScheduler(resolveSchedulerBean(beanFactory, TaskScheduler.class, false));
|
||||
this.registrar.setTaskScheduler(resolveSchedulerBean(this.beanFactory, TaskScheduler.class, false));
|
||||
}
|
||||
catch (NoUniqueBeanDefinitionException ex) {
|
||||
logger.debug("Could not find unique TaskScheduler bean", ex);
|
||||
try {
|
||||
this.registrar.setTaskScheduler(resolveSchedulerBean(beanFactory, TaskScheduler.class, true));
|
||||
this.registrar.setTaskScheduler(resolveSchedulerBean(this.beanFactory, TaskScheduler.class, true));
|
||||
}
|
||||
catch (NoSuchBeanDefinitionException ex2) {
|
||||
if (logger.isInfoEnabled()) {
|
||||
@@ -271,12 +271,12 @@ public class ScheduledAnnotationBeanPostProcessor
|
||||
logger.debug("Could not find default TaskScheduler bean", ex);
|
||||
// Search for ScheduledExecutorService bean next...
|
||||
try {
|
||||
this.registrar.setScheduler(resolveSchedulerBean(beanFactory, ScheduledExecutorService.class, false));
|
||||
this.registrar.setScheduler(resolveSchedulerBean(this.beanFactory, ScheduledExecutorService.class, false));
|
||||
}
|
||||
catch (NoUniqueBeanDefinitionException ex2) {
|
||||
logger.debug("Could not find unique ScheduledExecutorService bean", ex2);
|
||||
try {
|
||||
this.registrar.setScheduler(resolveSchedulerBean(beanFactory, ScheduledExecutorService.class, true));
|
||||
this.registrar.setScheduler(resolveSchedulerBean(this.beanFactory, ScheduledExecutorService.class, true));
|
||||
}
|
||||
catch (NoSuchBeanDefinitionException ex3) {
|
||||
if (logger.isInfoEnabled()) {
|
||||
|
||||
@@ -284,8 +284,8 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport
|
||||
private void executeAndTrack(ExecutorService executor, ListenableFutureTask<?> listenableFuture) {
|
||||
Future<?> scheduledFuture = executor.submit(errorHandlingTask(listenableFuture, false));
|
||||
this.listenableFutureMap.put(scheduledFuture, listenableFuture);
|
||||
listenableFuture.addCallback(result -> listenableFutureMap.remove(scheduledFuture),
|
||||
ex -> listenableFutureMap.remove(scheduledFuture));
|
||||
listenableFuture.addCallback(result -> this.listenableFutureMap.remove(scheduledFuture),
|
||||
ex -> this.listenableFutureMap.remove(scheduledFuture));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -186,7 +186,7 @@ public class CronSequenceGenerator {
|
||||
|
||||
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
|
||||
int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
int updateDayOfMonth = findNextDay(calendar, this.daysOfMonth, dayOfMonth, daysOfWeek, dayOfWeek, resets);
|
||||
int updateDayOfMonth = findNextDay(calendar, this.daysOfMonth, dayOfMonth, this.daysOfWeek, dayOfWeek, resets);
|
||||
if (dayOfMonth == updateDayOfMonth) {
|
||||
resets.add(Calendar.DAY_OF_MONTH);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,7 @@ public class DelegatingThemeSource implements HierarchicalThemeSource {
|
||||
@Override
|
||||
@Nullable
|
||||
public ThemeSource getParentThemeSource() {
|
||||
return parentThemeSource;
|
||||
return this.parentThemeSource;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -164,7 +164,7 @@ public class LocalVariableTableParameterNameDiscoverer implements ParameterNameD
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
// exclude synthetic + bridged && static class initialization
|
||||
if (!isSyntheticOrBridged(access) && !STATIC_CLASS_INIT.equals(name)) {
|
||||
return new LocalVariableTableVisitor(clazz, memberMap, name, desc, isStatic(access));
|
||||
return new LocalVariableTableVisitor(this.clazz, this.memberMap, name, desc, isStatic(access));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class ReactiveAdapterRegistry {
|
||||
public void registerReactiveType(ReactiveTypeDescriptor descriptor,
|
||||
Function<Object, Publisher<?>> toAdapter, Function<Publisher<?>, Object> fromAdapter) {
|
||||
|
||||
if (reactorPresent) {
|
||||
if (this.reactorPresent) {
|
||||
this.adapters.add(new ReactorAdapter(descriptor, toAdapter, fromAdapter));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -642,7 +642,7 @@ public class GenericConversionService implements ConfigurableConversionService {
|
||||
|
||||
private List<String> getConverterStrings() {
|
||||
List<String> converterStrings = new ArrayList<>();
|
||||
for (ConvertersForPair convertersForPair : converters.values()) {
|
||||
for (ConvertersForPair convertersForPair : this.converters.values()) {
|
||||
converterStrings.add(convertersForPair.toString());
|
||||
}
|
||||
Collections.sort(converterStrings);
|
||||
|
||||
@@ -106,7 +106,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
|
||||
|
||||
private final Set<String> defaultProfiles = new LinkedHashSet<>(getReservedDefaultProfiles());
|
||||
|
||||
private final MutablePropertySources propertySources = new MutablePropertySources(this.logger);
|
||||
private final MutablePropertySources propertySources = new MutablePropertySources(logger);
|
||||
|
||||
private final ConfigurablePropertyResolver propertyResolver =
|
||||
new PropertySourcesPropertyResolver(this.propertySources);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -226,7 +226,7 @@ public class ClassPathResource extends AbstractFileResolvingResource {
|
||||
@Override
|
||||
public String getDescription() {
|
||||
StringBuilder builder = new StringBuilder("class path resource [");
|
||||
String pathToUse = path;
|
||||
String pathToUse = this.path;
|
||||
if (this.clazz != null && !pathToUse.startsWith("/")) {
|
||||
builder.append(ClassUtils.classPackageAsResourcePath(this.clazz));
|
||||
builder.append('/');
|
||||
|
||||
@@ -750,8 +750,8 @@ public class AntPathMatcher implements PathMatcher {
|
||||
return -1;
|
||||
}
|
||||
|
||||
boolean pattern1EqualsPath = pattern1.equals(path);
|
||||
boolean pattern2EqualsPath = pattern2.equals(path);
|
||||
boolean pattern1EqualsPath = pattern1.equals(this.path);
|
||||
boolean pattern2EqualsPath = pattern2.equals(this.path);
|
||||
if (pattern1EqualsPath && pattern2EqualsPath) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -557,7 +557,7 @@ public abstract class CollectionUtils {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
return map.equals(other);
|
||||
return this.map.equals(other);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -260,7 +260,7 @@ public abstract class StreamUtils {
|
||||
@Override
|
||||
public void write(byte[] b, int off, int let) throws IOException {
|
||||
// It is critical that we override this method for performance
|
||||
out.write(b, off, let);
|
||||
this.out.write(b, off, let);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -117,7 +117,7 @@ public class ExponentialBackOff implements BackOff {
|
||||
* Return the initial interval in milliseconds.
|
||||
*/
|
||||
public long getInitialInterval() {
|
||||
return initialInterval;
|
||||
return this.initialInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,7 +132,7 @@ public class ExponentialBackOff implements BackOff {
|
||||
* Return the value to multiply the current interval by for each retry attempt.
|
||||
*/
|
||||
public double getMultiplier() {
|
||||
return multiplier;
|
||||
return this.multiplier;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,7 +146,7 @@ public class ExponentialBackOff implements BackOff {
|
||||
* Return the maximum back off time.
|
||||
*/
|
||||
public long getMaxInterval() {
|
||||
return maxInterval;
|
||||
return this.maxInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,7 +162,7 @@ public class ExponentialBackOff implements BackOff {
|
||||
* {@link BackOffExecution#nextBackOff()} returns {@link BackOffExecution#STOP}.
|
||||
*/
|
||||
public long getMaxElapsedTime() {
|
||||
return maxElapsedTime;
|
||||
return this.maxElapsedTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -69,7 +69,7 @@ public class FixedBackOff implements BackOff {
|
||||
* Return the interval between two attempts in milliseconds.
|
||||
*/
|
||||
public long getInterval() {
|
||||
return interval;
|
||||
return this.interval;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,7 +83,7 @@ public class FixedBackOff implements BackOff {
|
||||
* Return the maximum number of attempts in milliseconds.
|
||||
*/
|
||||
public long getMaxAttempts() {
|
||||
return maxAttempts;
|
||||
return this.maxAttempts;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,10 +53,10 @@ public class CompletableToListenableFutureAdapter<T> implements ListenableFuture
|
||||
this.completableFuture = completableFuture;
|
||||
this.completableFuture.whenComplete((result, ex) -> {
|
||||
if (ex != null) {
|
||||
callbacks.failure(ex);
|
||||
this.callbacks.failure(ex);
|
||||
}
|
||||
else {
|
||||
callbacks.success(result);
|
||||
this.callbacks.success(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -55,27 +55,27 @@ class DomContentHandler implements ContentHandler {
|
||||
Assert.notNull(node, "node must not be null");
|
||||
this.node = node;
|
||||
if (node instanceof Document) {
|
||||
document = (Document) node;
|
||||
this.document = (Document) node;
|
||||
}
|
||||
else {
|
||||
document = node.getOwnerDocument();
|
||||
this.document = node.getOwnerDocument();
|
||||
}
|
||||
Assert.notNull(document, "document must not be null");
|
||||
Assert.notNull(this.document, "document must not be null");
|
||||
}
|
||||
|
||||
private Node getParent() {
|
||||
if (!elements.isEmpty()) {
|
||||
return elements.get(elements.size() - 1);
|
||||
if (!this.elements.isEmpty()) {
|
||||
return this.elements.get(this.elements.size() - 1);
|
||||
}
|
||||
else {
|
||||
return node;
|
||||
return this.node;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
||||
Node parent = getParent();
|
||||
Element element = document.createElementNS(uri, qName);
|
||||
Element element = this.document.createElementNS(uri, qName);
|
||||
for (int i = 0; i < attributes.getLength(); i++) {
|
||||
String attrUri = attributes.getURI(i);
|
||||
String attrQname = attributes.getQName(i);
|
||||
@@ -85,12 +85,12 @@ class DomContentHandler implements ContentHandler {
|
||||
}
|
||||
}
|
||||
element = (Element) parent.appendChild(element);
|
||||
elements.add(element);
|
||||
this.elements.add(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endElement(String uri, String localName, String qName) throws SAXException {
|
||||
elements.remove(elements.size() - 1);
|
||||
this.elements.remove(this.elements.size() - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -102,7 +102,7 @@ class DomContentHandler implements ContentHandler {
|
||||
((Text) lastChild).appendData(data);
|
||||
}
|
||||
else {
|
||||
Text text = document.createTextNode(data);
|
||||
Text text = this.document.createTextNode(data);
|
||||
parent.appendChild(text);
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ class DomContentHandler implements ContentHandler {
|
||||
@Override
|
||||
public void processingInstruction(String target, String data) throws SAXException {
|
||||
Node parent = getParent();
|
||||
ProcessingInstruction pi = document.createProcessingInstruction(target, data);
|
||||
ProcessingInstruction pi = this.document.createProcessingInstruction(target, data);
|
||||
parent.appendChild(pi);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -95,7 +95,7 @@ class XMLEventStreamReader extends AbstractXMLStreamReader {
|
||||
@Override
|
||||
public boolean isStandalone() {
|
||||
if (this.event.isStartDocument()) {
|
||||
return ((StartDocument) event).isStandalone();
|
||||
return ((StartDocument) this.event).isStandalone();
|
||||
}
|
||||
else {
|
||||
throw new IllegalStateException();
|
||||
@@ -152,7 +152,7 @@ class XMLEventStreamReader extends AbstractXMLStreamReader {
|
||||
@Override
|
||||
public String getText() {
|
||||
if (this.event.isCharacters()) {
|
||||
return event.asCharacters().getData();
|
||||
return this.event.asCharacters().getData();
|
||||
}
|
||||
else if (this.event.getEventType() == XMLEvent.COMMENT) {
|
||||
return ((Comment) this.event).getText();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -167,11 +167,11 @@ public class InlineList extends SpelNodeImpl {
|
||||
// The children might be further lists if they are not constants. In this
|
||||
// situation do not call back into generateCode() because it will register another clinit adder.
|
||||
// Instead, directly build the list here:
|
||||
if (children[c] instanceof InlineList) {
|
||||
((InlineList)children[c]).generateClinitCode(clazzname, constantFieldName, mv, codeflow, true);
|
||||
if (this.children[c] instanceof InlineList) {
|
||||
((InlineList)this.children[c]).generateClinitCode(clazzname, constantFieldName, mv, codeflow, true);
|
||||
}
|
||||
else {
|
||||
children[c].generateCode(mv, codeflow);
|
||||
this.children[c].generateCode(mv, codeflow);
|
||||
String lastDesc = codeflow.lastDescriptor();
|
||||
if (CodeFlow.isPrimitive(lastDesc)) {
|
||||
CodeFlow.insertBoxIfNecessary(mv, lastDesc.charAt(0));
|
||||
|
||||
@@ -249,7 +249,7 @@ public class MethodReference extends SpelNodeImpl {
|
||||
Method method = ((ReflectiveMethodExecutor) executorToCheck.get()).getMethod();
|
||||
String descriptor = CodeFlow.toDescriptor(method.getReturnType());
|
||||
if (this.nullSafe && CodeFlow.isPrimitive(descriptor)) {
|
||||
originalPrimitiveExitTypeDescriptor = descriptor;
|
||||
this.originalPrimitiveExitTypeDescriptor = descriptor;
|
||||
this.exitTypeDescriptor = CodeFlow.toBoxedDescriptor(descriptor);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -116,7 +116,7 @@ public class VariableReference extends SpelNodeImpl {
|
||||
}
|
||||
else {
|
||||
mv.visitVarInsn(ALOAD, 2);
|
||||
mv.visitLdcInsn(name);
|
||||
mv.visitLdcInsn(this.name);
|
||||
mv.visitMethodInsn(INVOKEINTERFACE, "org/springframework/expression/EvaluationContext", "lookupVariable", "(Ljava/lang/String;)Ljava/lang/Object;",true);
|
||||
}
|
||||
CodeFlow.insertCheckCast(mv, this.exitTypeDescriptor);
|
||||
|
||||
@@ -256,12 +256,12 @@ public final class SpelCompiler implements Opcodes {
|
||||
}
|
||||
|
||||
int getClassesDefinedCount() {
|
||||
return classesDefinedCount;
|
||||
return this.classesDefinedCount;
|
||||
}
|
||||
|
||||
public Class<?> defineClass(String name, byte[] bytes) {
|
||||
Class<?> clazz = super.defineClass(name, bytes, 0, bytes.length);
|
||||
classesDefinedCount++;
|
||||
this.classesDefinedCount++;
|
||||
return clazz;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -185,7 +185,7 @@ public class SpelExpression implements Expression {
|
||||
public Object getValue(Object rootObject) throws EvaluationException {
|
||||
if (this.compiledAst != null) {
|
||||
try {
|
||||
return this.compiledAst.getValue(rootObject, evaluationContext);
|
||||
return this.compiledAst.getValue(rootObject, this.evaluationContext);
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
// If running in mixed mode, revert to interpreted
|
||||
|
||||
@@ -103,7 +103,7 @@ public class OracleTableMetaDataProvider extends GenericTableMetaDataProvider {
|
||||
@Nullable
|
||||
protected String getDefaultSchema() {
|
||||
if (this.defaultSchema != null) {
|
||||
return defaultSchema;
|
||||
return this.defaultSchema;
|
||||
}
|
||||
return super.getDefaultSchema();
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public abstract class SqlCall extends RdbmsOperation {
|
||||
* Return whether this call is for a function.
|
||||
*/
|
||||
public boolean isFunction() {
|
||||
return function;
|
||||
return this.function;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +117,7 @@ public abstract class SqlCall extends RdbmsOperation {
|
||||
* Return whether the SQL can be used as is.
|
||||
*/
|
||||
public boolean isSqlReadyForUse() {
|
||||
return sqlReadyForUse;
|
||||
return this.sqlReadyForUse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public final class CustomSQLExceptionTranslatorRegistry {
|
||||
* @param translator the custom translator
|
||||
*/
|
||||
public void registerTranslator(String dbName, SQLExceptionTranslator translator) {
|
||||
SQLExceptionTranslator replaced = translatorMap.put(dbName, translator);
|
||||
SQLExceptionTranslator replaced = this.translatorMap.put(dbName, translator);
|
||||
if (replaced != null) {
|
||||
logger.warn("Replacing custom translator [" + replaced + "] for database '" + dbName +
|
||||
"' with [" + translator + "]");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -123,7 +123,7 @@ public class SQLErrorCodes {
|
||||
}
|
||||
|
||||
public String[] getDuplicateKeyCodes() {
|
||||
return duplicateKeyCodes;
|
||||
return this.duplicateKeyCodes;
|
||||
}
|
||||
|
||||
public void setDuplicateKeyCodes(String... duplicateKeyCodes) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -57,7 +57,7 @@ public class JmsListenerEndpointRegistrar implements BeanFactoryAware, Initializ
|
||||
|
||||
private boolean startImmediately;
|
||||
|
||||
private Object mutex = endpointDescriptors;
|
||||
private Object mutex = this.endpointDescriptors;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -486,7 +486,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
|
||||
@Override
|
||||
public boolean isReplyPubSubDomain() {
|
||||
if (this.replyPubSubDomain != null) {
|
||||
return replyPubSubDomain;
|
||||
return this.replyPubSubDomain;
|
||||
}
|
||||
else {
|
||||
return isPubSubDomain();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -293,7 +293,7 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
|
||||
MessageConsumer consumer = createConsumer(session, destination);
|
||||
|
||||
if (this.taskExecutor != null) {
|
||||
consumer.setMessageListener(message -> taskExecutor.execute(() -> processMessage(message, session)));
|
||||
consumer.setMessageListener(message -> this.taskExecutor.execute(() -> processMessage(message, session)));
|
||||
}
|
||||
else {
|
||||
consumer.setMessageListener(message -> processMessage(message, session));
|
||||
|
||||
@@ -64,7 +64,7 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory {
|
||||
* Return the JMS MessageListener for this endpoint.
|
||||
*/
|
||||
protected MessageListener getMessageListener() {
|
||||
Assert.state(messageListener != null, "No MessageListener set");
|
||||
Assert.state(this.messageListener != null, "No MessageListener set");
|
||||
return this.messageListener;
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendToMethodReturnValueHandler [annotationRequired=" + annotationRequired + "]";
|
||||
return "SendToMethodReturnValueHandler [annotationRequired=" + this.annotationRequired + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
|
||||
}
|
||||
return;
|
||||
}
|
||||
stats.incrementDisconnectCount();
|
||||
this.stats.incrementDisconnectCount();
|
||||
handler.forward(message, stompAccessor);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -431,7 +431,7 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
|
||||
@Override
|
||||
@Nullable
|
||||
public String getFirst(String headerName) {
|
||||
List<String> headerValues = headers.get(headerName);
|
||||
List<String> headerValues = this.headers.get(headerName);
|
||||
return headerValues != null ? headerValues.get(0) : null;
|
||||
}
|
||||
|
||||
@@ -445,13 +445,13 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
|
||||
*/
|
||||
@Override
|
||||
public void add(String headerName, @Nullable String headerValue) {
|
||||
List<String> headerValues = headers.computeIfAbsent(headerName, k -> new LinkedList<>());
|
||||
List<String> headerValues = this.headers.computeIfAbsent(headerName, k -> new LinkedList<>());
|
||||
headerValues.add(headerValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAll(String headerName, List<? extends String> headerValues) {
|
||||
List<String> currentValues = headers.computeIfAbsent(headerName, k -> new LinkedList<>());
|
||||
List<String> currentValues = this.headers.computeIfAbsent(headerName, k -> new LinkedList<>());
|
||||
currentValues.addAll(headerValues);
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
|
||||
public void set(String headerName, @Nullable String headerValue) {
|
||||
List<String> headerValues = new LinkedList<>();
|
||||
headerValues.add(headerValue);
|
||||
headers.put(headerName, headerValues);
|
||||
this.headers.put(headerName, headerValues);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -483,7 +483,7 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
|
||||
@Override
|
||||
public Map<String, String> toSingleValueMap() {
|
||||
LinkedHashMap<String, String> singleValueMap = new LinkedHashMap<>(this.headers.size());
|
||||
headers.forEach((key, value) -> singleValueMap.put(key, value.get(0)));
|
||||
this.headers.forEach((key, value) -> singleValueMap.put(key, value.get(0)));
|
||||
return singleValueMap;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -57,10 +57,10 @@ abstract class AbstractMonoToListenableFutureAdapter<S, T> implements Listenable
|
||||
adapted = adapt(result);
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
registry.failure(ex);
|
||||
this.registry.failure(ex);
|
||||
return;
|
||||
}
|
||||
registry.success(adapted);
|
||||
this.registry.success(adapted);
|
||||
})
|
||||
.doOnError(this.registry::failure)
|
||||
.toProcessor();
|
||||
|
||||
@@ -277,7 +277,7 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
|
||||
});
|
||||
DirectProcessor<Void> completion = DirectProcessor.create();
|
||||
TcpConnection<P> connection = new ReactorNettyTcpConnection<>(inbound, outbound, codec, completion);
|
||||
scheduler.schedule(() -> connectionHandler.afterConnected(connection));
|
||||
scheduler.schedule(() -> this.connectionHandler.afterConnected(connection));
|
||||
|
||||
inbound.withConnection(conn -> conn.addHandler(new StompMessageDecoder<>(codec)));
|
||||
|
||||
@@ -285,9 +285,9 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
|
||||
.cast(Message.class)
|
||||
.publishOn(scheduler, PUBLISH_ON_BUFFER_SIZE)
|
||||
.subscribe(
|
||||
connectionHandler::handleMessage,
|
||||
connectionHandler::handleFailure,
|
||||
connectionHandler::afterConnectionClosed);
|
||||
this.connectionHandler::handleMessage,
|
||||
this.connectionHandler::handleFailure,
|
||||
this.connectionHandler::afterConnectionClosed);
|
||||
|
||||
return completion;
|
||||
}
|
||||
@@ -304,7 +304,7 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
|
||||
|
||||
@Override
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) {
|
||||
Collection<Message<P>> messages = codec.decode(in);
|
||||
Collection<Message<P>> messages = this.codec.decode(in);
|
||||
out.addAll(messages);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
@Nullable
|
||||
public Interceptor getEntityInterceptor() throws IllegalStateException, BeansException {
|
||||
if (this.entityInterceptor instanceof Interceptor) {
|
||||
return (Interceptor) entityInterceptor;
|
||||
return (Interceptor) this.entityInterceptor;
|
||||
}
|
||||
else if (this.entityInterceptor instanceof String) {
|
||||
if (this.beanFactory == null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -96,7 +96,7 @@ class AsyncRequestInterceptor implements CallableProcessingInterceptor, Deferred
|
||||
private void closeEntityManager() {
|
||||
if (this.timeoutInProgress || this.errorInProgress) {
|
||||
logger.debug("Closing JPA EntityManager after async request timeout/error");
|
||||
EntityManagerFactoryUtils.closeEntityManager(emHolder.getEntityManager());
|
||||
EntityManagerFactoryUtils.closeEntityManager(this.emHolder.getEntityManager());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -550,7 +550,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
|
||||
|
||||
@Override
|
||||
protected void marshalOutputStream(Object graph, OutputStream outputStream) throws XmlMappingException, IOException {
|
||||
marshalWriter(graph, new OutputStreamWriter(outputStream, encoding));
|
||||
marshalWriter(graph, new OutputStreamWriter(outputStream, this.encoding));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -230,8 +230,8 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
|
||||
}
|
||||
}
|
||||
else if (this.targetPackage != null) {
|
||||
if (!StringUtils.hasLength(bindingName)) {
|
||||
bindingName = DEFAULT_BINDING_NAME;
|
||||
if (!StringUtils.hasLength(this.bindingName)) {
|
||||
this.bindingName = DEFAULT_BINDING_NAME;
|
||||
}
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Configured for target package [" + this.targetPackage + "] using binding [" + this.bindingName + "]");
|
||||
@@ -290,9 +290,9 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
|
||||
}
|
||||
|
||||
private void marshalDocument(IMarshallingContext marshallingContext, Object graph) throws IOException, JiBXException {
|
||||
if (StringUtils.hasLength(docTypeRootElementName)) {
|
||||
if (StringUtils.hasLength(this.docTypeRootElementName)) {
|
||||
IXMLWriter xmlWriter = marshallingContext.getXmlWriter();
|
||||
xmlWriter.writeDocType(docTypeRootElementName, docTypeSystemId, docTypePublicId, docTypeInternalSubset);
|
||||
xmlWriter.writeDocType(this.docTypeRootElementName, this.docTypeSystemId, this.docTypePublicId, this.docTypeInternalSubset);
|
||||
}
|
||||
marshallingContext.marshalDocument(graph);
|
||||
}
|
||||
@@ -391,7 +391,7 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
|
||||
protected Object unmarshalInputStream(InputStream inputStream) throws XmlMappingException, IOException {
|
||||
try {
|
||||
IUnmarshallingContext unmarshallingContext = createUnmarshallingContext();
|
||||
return unmarshallingContext.unmarshalDocument(inputStream, encoding);
|
||||
return unmarshallingContext.unmarshalDocument(inputStream, this.encoding);
|
||||
}
|
||||
catch (JiBXException ex) {
|
||||
throw convertJibxException(ex, false);
|
||||
|
||||
@@ -193,7 +193,7 @@ public class MarshallingSource extends SAXSource {
|
||||
@Nullable
|
||||
public Object getProperty(String name) throws SAXNotRecognizedException {
|
||||
if ("http://xml.org/sax/properties/lexical-handler".equals(name)) {
|
||||
return lexicalHandler;
|
||||
return this.lexicalHandler;
|
||||
}
|
||||
else {
|
||||
throw new SAXNotRecognizedException(name);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,14 +37,14 @@ public class MockEnvironment extends AbstractEnvironment {
|
||||
* Create a new {@code MockEnvironment} with a single {@link MockPropertySource}.
|
||||
*/
|
||||
public MockEnvironment() {
|
||||
getPropertySources().addLast(propertySource);
|
||||
getPropertySources().addLast(this.propertySource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a property on the underlying {@link MockPropertySource} for this environment.
|
||||
*/
|
||||
public void setProperty(String key, String value) {
|
||||
propertySource.setProperty(key, value);
|
||||
this.propertySource.setProperty(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -120,7 +120,7 @@ public class MockClientHttpResponse implements ClientHttpResponse {
|
||||
public Mono<String> getBodyAsString() {
|
||||
Charset charset = getCharset();
|
||||
return Flux.from(getBody())
|
||||
.reduce(bufferFactory.allocateBuffer(), (previous, current) -> {
|
||||
.reduce(this.bufferFactory.allocateBuffer(), (previous, current) -> {
|
||||
previous.write(current);
|
||||
DataBufferUtils.release(current);
|
||||
return previous;
|
||||
|
||||
@@ -226,7 +226,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
|
||||
}
|
||||
|
||||
// Default case...
|
||||
return environment1 -> new SimpleNamingContext("", boundObjects, (Hashtable<String, Object>) environment1);
|
||||
return environment1 -> new SimpleNamingContext("", this.boundObjects, (Hashtable<String, Object>) environment1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class MockAsyncContext implements AsyncContext {
|
||||
|
||||
@Override
|
||||
public void complete() {
|
||||
MockHttpServletRequest mockRequest = WebUtils.getNativeRequest(request, MockHttpServletRequest.class);
|
||||
MockHttpServletRequest mockRequest = WebUtils.getNativeRequest(this.request, MockHttpServletRequest.class);
|
||||
if (mockRequest != null) {
|
||||
mockRequest.setAsyncStarted(false);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -82,12 +82,12 @@ public class MockFilterConfig implements FilterConfig {
|
||||
|
||||
@Override
|
||||
public String getFilterName() {
|
||||
return filterName;
|
||||
return this.filterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServletContext getServletContext() {
|
||||
return servletContext;
|
||||
return this.servletContext;
|
||||
}
|
||||
|
||||
public void addInitParameter(String name, String value) {
|
||||
|
||||
@@ -1285,7 +1285,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
public String changeSessionId() {
|
||||
Assert.isTrue(this.session != null, "The request does not have a session");
|
||||
if (this.session instanceof MockHttpSession) {
|
||||
return ((MockHttpSession) session).changeSessionId();
|
||||
return ((MockHttpSession) this.session).changeSessionId();
|
||||
}
|
||||
return this.session.getId();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -177,7 +177,7 @@ public abstract class AbstractTransactionalJUnit4SpringContextTests extends Abst
|
||||
* @see JdbcTestUtils#deleteFromTableWhere
|
||||
*/
|
||||
protected int deleteFromTableWhere(String tableName, String whereClause, Object... args) {
|
||||
return JdbcTestUtils.deleteFromTableWhere(jdbcTemplate, tableName, whereClause, args);
|
||||
return JdbcTestUtils.deleteFromTableWhere(this.jdbcTemplate, tableName, whereClause, args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -227,10 +227,10 @@ public class SpringClassRule implements TestRule {
|
||||
@Override
|
||||
public void evaluate() throws Throwable {
|
||||
try {
|
||||
next.evaluate();
|
||||
this.next.evaluate();
|
||||
}
|
||||
finally {
|
||||
testContextManagerCache.remove(testClass);
|
||||
testContextManagerCache.remove(this.testClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -60,7 +60,7 @@ public class RunPrepareTestInstanceCallbacks extends Statement {
|
||||
*/
|
||||
@Override
|
||||
public void evaluate() throws Throwable {
|
||||
this.testContextManager.prepareTestInstance(testInstance);
|
||||
this.testContextManager.prepareTestInstance(this.testInstance);
|
||||
this.next.evaluate();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -68,8 +68,8 @@ public class DefaultBootstrapContext implements BootstrapContext {
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringCreator(this)//
|
||||
.append("testClass", testClass.getName())//
|
||||
.append("cacheAwareContextLoaderDelegate", cacheAwareContextLoaderDelegate.getClass().getName())//
|
||||
.append("testClass", this.testClass.getName())//
|
||||
.append("cacheAwareContextLoaderDelegate", this.cacheAwareContextLoaderDelegate.getClass().getName())//
|
||||
.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ public class DefaultTestContext implements TestContext {
|
||||
@SuppressWarnings("resource")
|
||||
ConfigurableApplicationContext cac = (ConfigurableApplicationContext) context;
|
||||
Assert.state(cac.isActive(), () ->
|
||||
"The ApplicationContext loaded for [" + mergedContextConfiguration +
|
||||
"The ApplicationContext loaded for [" + this.mergedContextConfiguration +
|
||||
"] is not active. This may be due to one of the following reasons: " +
|
||||
"1) the context was closed programmatically by user code; " +
|
||||
"2) the context was closed during parallel test execution either " +
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -141,11 +141,11 @@ class TestPropertySourceAttributes {
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringCreator(this)//
|
||||
.append("declaringClass", declaringClass.getName())//
|
||||
.append("locations", ObjectUtils.nullSafeToString(locations))//
|
||||
.append("inheritLocations", inheritLocations)//
|
||||
.append("properties", ObjectUtils.nullSafeToString(properties))//
|
||||
.append("inheritProperties", inheritProperties)//
|
||||
.append("declaringClass", this.declaringClass.getName())//
|
||||
.append("locations", ObjectUtils.nullSafeToString(this.locations))//
|
||||
.append("inheritLocations", this.inheritLocations)//
|
||||
.append("properties", ObjectUtils.nullSafeToString(this.properties))//
|
||||
.append("inheritProperties", this.inheritProperties)//
|
||||
.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -161,7 +161,7 @@ public abstract class AbstractTransactionalTestNGSpringContextTests extends Abst
|
||||
* @see JdbcTestUtils#deleteFromTableWhere
|
||||
*/
|
||||
protected int deleteFromTableWhere(String tableName, String whereClause, Object... args) {
|
||||
return JdbcTestUtils.deleteFromTableWhere(jdbcTemplate, tableName, whereClause, args);
|
||||
return JdbcTestUtils.deleteFromTableWhere(this.jdbcTemplate, tableName, whereClause, args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,7 +106,7 @@ class TransactionContext {
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info(String.format(
|
||||
"Began transaction (%s) for test context %s; transaction manager [%s]; rollback [%s]",
|
||||
transactionsStarted, this.testContext, this.transactionManager, flaggedForRollback));
|
||||
transactionsStarted, this.testContext, this.transactionManager, this.flaggedForRollback));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,12 +104,12 @@ public class XmlExpectationsHelper {
|
||||
|
||||
|
||||
public boolean hasDifferences() {
|
||||
return diff.hasDifferences();
|
||||
return this.diff.hasDifferences();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return diff.toString();
|
||||
return this.diff.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -85,7 +85,7 @@ public class MockMvcClientHttpRequestFactory
|
||||
HttpMethod httpMethod, URI uri, HttpHeaders requestHeaders, byte[] requestBody) {
|
||||
|
||||
try {
|
||||
MockHttpServletResponse servletResponse = mockMvc
|
||||
MockHttpServletResponse servletResponse = this.mockMvc
|
||||
.perform(request(httpMethod, uri).content(requestBody).headers(requestHeaders))
|
||||
.andReturn()
|
||||
.getResponse();
|
||||
|
||||
@@ -231,7 +231,7 @@ public class ContentRequestMatchers {
|
||||
return request -> {
|
||||
try {
|
||||
MockClientHttpRequest mockRequest = (MockClientHttpRequest) request;
|
||||
jsonHelper.assertJsonEqual(expectedJsonContent, mockRequest.getBodyAsString(), strict);
|
||||
this.jsonHelper.assertJsonEqual(expectedJsonContent, mockRequest.getBodyAsString(), strict);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new AssertionError("Failed to parse expected or actual JSON request content", ex);
|
||||
|
||||
@@ -218,8 +218,8 @@ class WiretapConnector implements ClientHttpConnector {
|
||||
@Override
|
||||
public Flux<DataBuffer> getBody() {
|
||||
return super.getBody()
|
||||
.doOnNext(buffer::write)
|
||||
.doOnError(body::onError)
|
||||
.doOnNext(this.buffer::write)
|
||||
.doOnError(this.body::onError)
|
||||
.doOnCancel(this::handleOnComplete)
|
||||
.doOnComplete(this::handleOnComplete);
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ final class HtmlUnitRequestBuilder implements RequestBuilder, Mergeable {
|
||||
synchronized (HtmlUnitRequestBuilder.this.sessions) {
|
||||
HtmlUnitRequestBuilder.this.sessions.remove(getId());
|
||||
}
|
||||
removeSessionCookie(request, getId());
|
||||
removeSessionCookie(this.request, getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ final class MockWebResponseBuilder {
|
||||
public WebResponse build() throws IOException {
|
||||
WebResponseData webResponseData = webResponseData();
|
||||
long endTime = System.currentTimeMillis();
|
||||
return new WebResponse(webResponseData, webRequest, endTime - startTime);
|
||||
return new WebResponse(webResponseData, this.webRequest, endTime - this.startTime);
|
||||
}
|
||||
|
||||
private WebResponseData webResponseData() throws IOException {
|
||||
|
||||
@@ -156,7 +156,7 @@ public class ContentResultMatchers {
|
||||
public ResultMatcher xml(final String xmlContent) {
|
||||
return result -> {
|
||||
String content = result.getResponse().getContentAsString();
|
||||
xmlHelper.assertXmlEqual(xmlContent, content);
|
||||
this.xmlHelper.assertXmlEqual(xmlContent, content);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ public class ContentResultMatchers {
|
||||
public ResultMatcher node(final Matcher<? super Node> matcher) {
|
||||
return result -> {
|
||||
String content = result.getResponse().getContentAsString();
|
||||
xmlHelper.assertNode(content, matcher);
|
||||
this.xmlHelper.assertNode(content, matcher);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public class ContentResultMatchers {
|
||||
public ResultMatcher source(final Matcher<? super Source> matcher) {
|
||||
return result -> {
|
||||
String content = result.getResponse().getContentAsString();
|
||||
xmlHelper.assertSource(content, matcher);
|
||||
this.xmlHelper.assertSource(content, matcher);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ public class ContentResultMatchers {
|
||||
public ResultMatcher json(final String jsonContent, final boolean strict) {
|
||||
return result -> {
|
||||
String content = result.getResponse().getContentAsString();
|
||||
jsonHelper.assertJsonEqual(jsonContent, content, strict);
|
||||
this.jsonHelper.assertJsonEqual(jsonContent, content, strict);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public class JsonPathResultMatchers {
|
||||
* @see #value(Object)
|
||||
*/
|
||||
public <T> ResultMatcher value(Matcher<T> matcher) {
|
||||
return result -> jsonPathHelper.assertValue(getContent(result), matcher);
|
||||
return result -> this.jsonPathHelper.assertValue(getContent(result), matcher);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,7 +98,7 @@ public class JsonPathResultMatchers {
|
||||
* @see #value(Object)
|
||||
*/
|
||||
public <T> ResultMatcher value(Matcher<T> matcher, Class<T> targetType) {
|
||||
return result -> jsonPathHelper.assertValue(getContent(result), matcher, targetType);
|
||||
return result -> this.jsonPathHelper.assertValue(getContent(result), matcher, targetType);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -108,7 +108,7 @@ public class JsonPathResultMatchers {
|
||||
* @see #value(Matcher, Class)
|
||||
*/
|
||||
public ResultMatcher value(Object expectedValue) {
|
||||
return result -> jsonPathHelper.assertValue(getContent(result), expectedValue);
|
||||
return result -> this.jsonPathHelper.assertValue(getContent(result), expectedValue);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,7 +120,7 @@ public class JsonPathResultMatchers {
|
||||
* <em>empty</em>.
|
||||
*/
|
||||
public ResultMatcher exists() {
|
||||
return result -> jsonPathHelper.exists(getContent(result));
|
||||
return result -> this.jsonPathHelper.exists(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,7 +131,7 @@ public class JsonPathResultMatchers {
|
||||
* <em>empty</em>.
|
||||
*/
|
||||
public ResultMatcher doesNotExist() {
|
||||
return result -> jsonPathHelper.doesNotExist(getContent(result));
|
||||
return result -> this.jsonPathHelper.doesNotExist(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,7 +145,7 @@ public class JsonPathResultMatchers {
|
||||
* @see #doesNotExist()
|
||||
*/
|
||||
public ResultMatcher isEmpty() {
|
||||
return result -> jsonPathHelper.assertValueIsEmpty(getContent(result));
|
||||
return result -> this.jsonPathHelper.assertValueIsEmpty(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,7 +159,7 @@ public class JsonPathResultMatchers {
|
||||
* @see #doesNotExist()
|
||||
*/
|
||||
public ResultMatcher isNotEmpty() {
|
||||
return result -> jsonPathHelper.assertValueIsNotEmpty(getContent(result));
|
||||
return result -> this.jsonPathHelper.assertValueIsNotEmpty(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,7 +173,7 @@ public class JsonPathResultMatchers {
|
||||
* @see #isNotEmpty()
|
||||
*/
|
||||
public ResultMatcher hasJsonPath() {
|
||||
return result -> jsonPathHelper.hasJsonPath(getContent(result));
|
||||
return result -> this.jsonPathHelper.hasJsonPath(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,7 +188,7 @@ public class JsonPathResultMatchers {
|
||||
* @see #isEmpty()
|
||||
*/
|
||||
public ResultMatcher doesNotHaveJsonPath() {
|
||||
return result -> jsonPathHelper.doesNotHaveJsonPath(getContent(result));
|
||||
return result -> this.jsonPathHelper.doesNotHaveJsonPath(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -197,7 +197,7 @@ public class JsonPathResultMatchers {
|
||||
* @since 4.2.1
|
||||
*/
|
||||
public ResultMatcher isString() {
|
||||
return result -> jsonPathHelper.assertValueIsString(getContent(result));
|
||||
return result -> this.jsonPathHelper.assertValueIsString(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,7 +206,7 @@ public class JsonPathResultMatchers {
|
||||
* @since 4.2.1
|
||||
*/
|
||||
public ResultMatcher isBoolean() {
|
||||
return result -> jsonPathHelper.assertValueIsBoolean(getContent(result));
|
||||
return result -> this.jsonPathHelper.assertValueIsBoolean(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,7 +215,7 @@ public class JsonPathResultMatchers {
|
||||
* @since 4.2.1
|
||||
*/
|
||||
public ResultMatcher isNumber() {
|
||||
return result -> jsonPathHelper.assertValueIsNumber(getContent(result));
|
||||
return result -> this.jsonPathHelper.assertValueIsNumber(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -223,7 +223,7 @@ public class JsonPathResultMatchers {
|
||||
* assert that the result is an array.
|
||||
*/
|
||||
public ResultMatcher isArray() {
|
||||
return result -> jsonPathHelper.assertValueIsArray(getContent(result));
|
||||
return result -> this.jsonPathHelper.assertValueIsArray(getContent(result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,7 +232,7 @@ public class JsonPathResultMatchers {
|
||||
* @since 4.2.1
|
||||
*/
|
||||
public ResultMatcher isMap() {
|
||||
return result -> jsonPathHelper.assertValueIsMap(getContent(result));
|
||||
return result -> this.jsonPathHelper.assertValueIsMap(getContent(result));
|
||||
}
|
||||
|
||||
private String getContent(MvcResult result) throws UnsupportedEncodingException {
|
||||
|
||||
@@ -64,7 +64,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher node(final Matcher<? super Node> matcher) {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.assertNode(response.getContentAsByteArray(), getDefinedEncoding(response), matcher);
|
||||
this.xpathHelper.assertNode(response.getContentAsByteArray(), getDefinedEncoding(response), matcher);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher exists() {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.exists(response.getContentAsByteArray(), getDefinedEncoding(response));
|
||||
this.xpathHelper.exists(response.getContentAsByteArray(), getDefinedEncoding(response));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher doesNotExist() {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.doesNotExist(response.getContentAsByteArray(), getDefinedEncoding(response));
|
||||
this.xpathHelper.doesNotExist(response.getContentAsByteArray(), getDefinedEncoding(response));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher nodeCount(final Matcher<Integer> matcher) {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.assertNodeCount(response.getContentAsByteArray(), getDefinedEncoding(response), matcher);
|
||||
this.xpathHelper.assertNodeCount(response.getContentAsByteArray(), getDefinedEncoding(response), matcher);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher nodeCount(final int expectedCount) {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.assertNodeCount(response.getContentAsByteArray(), getDefinedEncoding(response), expectedCount);
|
||||
this.xpathHelper.assertNodeCount(response.getContentAsByteArray(), getDefinedEncoding(response), expectedCount);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher string(final Matcher<? super String> matcher) {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.assertString(response.getContentAsByteArray(), getDefinedEncoding(response), matcher);
|
||||
this.xpathHelper.assertString(response.getContentAsByteArray(), getDefinedEncoding(response), matcher);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher string(final String expectedValue) {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.assertString(response.getContentAsByteArray(), getDefinedEncoding(response), expectedValue);
|
||||
this.xpathHelper.assertString(response.getContentAsByteArray(), getDefinedEncoding(response), expectedValue);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher number(final Matcher<? super Double> matcher) {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.assertNumber(response.getContentAsByteArray(), getDefinedEncoding(response), matcher);
|
||||
this.xpathHelper.assertNumber(response.getContentAsByteArray(), getDefinedEncoding(response), matcher);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher number(final Double expectedValue) {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.assertNumber(response.getContentAsByteArray(), getDefinedEncoding(response), expectedValue);
|
||||
this.xpathHelper.assertNumber(response.getContentAsByteArray(), getDefinedEncoding(response), expectedValue);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ public class XpathResultMatchers {
|
||||
public ResultMatcher booleanValue(final Boolean value) {
|
||||
return result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
xpathHelper.assertBoolean(response.getContentAsByteArray(), getDefinedEncoding(response), value);
|
||||
this.xpathHelper.assertBoolean(response.getContentAsByteArray(), getDefinedEncoding(response), value);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -230,7 +230,7 @@ public class SimpleTaskWorkManager implements WorkManager {
|
||||
@Override
|
||||
public void run() {
|
||||
if (this.acceptOnExecution) {
|
||||
this.workListener.workAccepted(new WorkEvent(this, WorkEvent.WORK_ACCEPTED, work, null));
|
||||
this.workListener.workAccepted(new WorkEvent(this, WorkEvent.WORK_ACCEPTED, this.work, null));
|
||||
}
|
||||
synchronized (this.monitor) {
|
||||
this.started = true;
|
||||
|
||||
@@ -87,7 +87,7 @@ public class HeuristicCompletionException extends TransactionException {
|
||||
* @see #STATE_MIXED
|
||||
*/
|
||||
public int getOutcomeState() {
|
||||
return outcomeState;
|
||||
return this.outcomeState;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class InvalidTimeoutException extends TransactionUsageException {
|
||||
* Return the invalid timeout value.
|
||||
*/
|
||||
public int getTimeout() {
|
||||
return timeout;
|
||||
return this.timeout;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -96,7 +96,7 @@ public class RollbackRuleAttribute implements Serializable{
|
||||
* Return the pattern for the exception name.
|
||||
*/
|
||||
public String getExceptionName() {
|
||||
return exceptionName;
|
||||
return this.exceptionName;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -177,9 +177,9 @@ public final class ContentDisposition {
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.filename);
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.charset);
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.size);
|
||||
result = 31 * result + (creationDate != null ? creationDate.hashCode() : 0);
|
||||
result = 31 * result + (modificationDate != null ? modificationDate.hashCode() : 0);
|
||||
result = 31 * result + (readDate != null ? readDate.hashCode() : 0);
|
||||
result = 31 * result + (this.creationDate != null ? this.creationDate.hashCode() : 0);
|
||||
result = 31 * result + (this.modificationDate != null ? this.modificationDate.hashCode() : 0);
|
||||
result = 31 * result + (this.readDate != null ? this.readDate.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -85,7 +85,7 @@ class InterceptingAsyncClientHttpRequest extends AbstractBufferingAsyncClientHtt
|
||||
|
||||
@Override
|
||||
public URI getURI() {
|
||||
return uri;
|
||||
return this.uri;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ class Netty4ClientHttpRequest extends AbstractAsyncClientHttpRequest implements
|
||||
FullHttpRequest nettyRequest = new DefaultFullHttpRequest(
|
||||
HttpVersion.HTTP_1_1, nettyMethod, path, this.body.buffer());
|
||||
|
||||
nettyRequest.headers().set(HttpHeaders.HOST, this.uri.getHost() + ":" + getPort(uri));
|
||||
nettyRequest.headers().set(HttpHeaders.HOST, this.uri.getHost() + ":" + getPort(this.uri));
|
||||
nettyRequest.headers().set(HttpHeaders.CONNECTION, "close");
|
||||
headers.forEach((headerName, headerValues) -> nettyRequest.headers().add(headerName, headerValues));
|
||||
if (!nettyRequest.headers().contains(HttpHeaders.CONTENT_LENGTH) && this.body.buffer().readableBytes() > 0) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -66,7 +66,7 @@ public class AsyncHttpAccessor {
|
||||
* org.springframework.http.client.ClientHttpRequest HttpRequests}.
|
||||
*/
|
||||
public org.springframework.http.client.AsyncClientHttpRequestFactory getAsyncRequestFactory() {
|
||||
Assert.state(asyncRequestFactory != null, "No AsyncClientHttpRequestFactory set");
|
||||
Assert.state(this.asyncRequestFactory != null, "No AsyncClientHttpRequestFactory set");
|
||||
return this.asyncRequestFactory;
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ public class MultipartHttpMessageWriter extends LoggingCodecSupport
|
||||
* @since 5.0.7
|
||||
*/
|
||||
public List<HttpMessageWriter<?>> getPartWriters() {
|
||||
return Collections.unmodifiableList(partWriters);
|
||||
return Collections.unmodifiableList(this.partWriters);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -398,7 +398,7 @@ public class MultipartHttpMessageWriter extends LoggingCodecSupport
|
||||
|
||||
private DataBuffer generateHeaders() {
|
||||
DataBuffer buffer = this.bufferFactory.allocateBuffer();
|
||||
for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
|
||||
for (Map.Entry<String, List<String>> entry : this.headers.entrySet()) {
|
||||
byte[] headerName = entry.getKey().getBytes(this.charset);
|
||||
for (String headerValueString : entry.getValue()) {
|
||||
byte[] headerValue = headerValueString.getBytes(this.charset);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user