Consistently use tabs rather than spaces

Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.

Issue: SPR-16968
This commit is contained in:
Phillip Webb 2018-06-18 14:42:00 -07:00 committed by Juergen Hoeller
parent be85bd8e09
commit 5cedd0d5d4
110 changed files with 527 additions and 526 deletions

View File

@ -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.
@ -20,7 +20,7 @@ package org.aopalliance.aop;
* Superclass for all AOP infrastructure exceptions.
* Unchecked, as such exceptions are fatal and end user
* code shouldn't be forced to catch them.
*
*
* @author Rod Johnson
* @author Bob Lee
* @author Juergen Hoeller

View File

@ -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.
@ -30,12 +30,12 @@ import java.lang.reflect.Constructor;
*/
public interface ConstructorInvocation extends Invocation {
/**
* Get the constructor being called.
* <p>This method is a friendly implementation of the
* {@link Joinpoint#getStaticPart()} method (same result).
* @return the constructor being called
*/
Constructor<?> getConstructor();
/**
* Get the constructor being called.
* <p>This method is a friendly implementation of the
* {@link Joinpoint#getStaticPart()} method (same result).
* @return the constructor being called
*/
Constructor<?> getConstructor();
}

View File

@ -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.
@ -24,7 +24,7 @@ import org.aopalliance.aop.Advice;
* <p>A generic interceptor can intercept runtime events that occur
* within a base program. Those events are materialized by (reified
* in) joinpoints. Runtime joinpoints can be invocations, field
* access, exceptions...
* access, exceptions...
*
* <p>This interface is not used directly. Use the sub-interfaces
* to intercept specific events. For instance, the following class
@ -32,7 +32,7 @@ import org.aopalliance.aop.Advice;
* debugger:
*
* <pre class=code>
* class DebuggingInterceptor implements MethodInterceptor,
* class DebuggingInterceptor implements MethodInterceptor,
* ConstructorInterceptor, FieldInterceptor {
*
* Object invoke(MethodInvocation i) throws Throwable {
@ -44,7 +44,7 @@ import org.aopalliance.aop.Advice;
* debug(i.getConstructor(), i.getThis(), i.getArgs());
* return i.proceed();
* }
*
*
* Object get(FieldAccess fa) throws Throwable {
* debug(fa.getField(), fa.getThis(), null);
* return fa.proceed();

View File

@ -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.
@ -41,7 +41,7 @@ package org.aopalliance.intercept;
*/
@FunctionalInterface
public interface MethodInterceptor extends Interceptor {
/**
* Implement this method to perform extra treatments before and
* after the invocation. Polite implementations would certainly

View File

@ -66,7 +66,7 @@ public abstract class AspectJProxyUtils {
return (advisor instanceof InstantiationModelAwarePointcutAdvisor ||
advisor.getAdvice() instanceof AbstractAspectJAdvice ||
(advisor instanceof PointcutAdvisor &&
((PointcutAdvisor) advisor).getPointcut() instanceof AspectJExpressionPointcut));
((PointcutAdvisor) advisor).getPointcut() instanceof AspectJExpressionPointcut));
}
}

View File

@ -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.
@ -47,7 +47,7 @@ public class AdvisorComponentDefinition extends AbstractComponentDefinition {
public AdvisorComponentDefinition(String advisorBeanName, BeanDefinition advisorDefinition) {
this(advisorBeanName, advisorDefinition, null);
this(advisorBeanName, advisorDefinition, null);
}
public AdvisorComponentDefinition(

View File

@ -113,8 +113,8 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil
for (Class<?> ifc : this.interfaces) {
if (this.advice instanceof DynamicIntroductionAdvice &&
!((DynamicIntroductionAdvice) this.advice).implementsInterface(ifc)) {
throw new IllegalArgumentException("DynamicIntroductionAdvice [" + this.advice + "] " +
"does not implement interface [" + ifc.getName() + "] specified for introduction");
throw new IllegalArgumentException("DynamicIntroductionAdvice [" + this.advice + "] " +
"does not implement interface [" + ifc.getName() + "] specified for introduction");
}
}
}

View File

@ -69,9 +69,9 @@ public class TypeMismatchException extends PropertyAccessException {
"Failed to convert property value of type '" +
ClassUtils.getDescriptiveType(propertyChangeEvent.getNewValue()) + "'" +
(requiredType != null ?
" to required type '" + ClassUtils.getQualifiedName(requiredType) + "'" : "") +
" to required type '" + ClassUtils.getQualifiedName(requiredType) + "'" : "") +
(propertyChangeEvent.getPropertyName() != null ?
" for property '" + propertyChangeEvent.getPropertyName() + "'" : ""),
" for property '" + propertyChangeEvent.getPropertyName() + "'" : ""),
cause);
this.propertyName = propertyChangeEvent.getPropertyName();
this.value = propertyChangeEvent.getNewValue();

View File

@ -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 @@ public class AnnotatedGenericBeanDefinition extends GenericBeanDefinition implem
@Override
public final AnnotationMetadata getMetadata() {
return this.metadata;
return this.metadata;
}
@Override

View File

@ -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.
@ -58,15 +58,15 @@ abstract class AutowireUtils {
*/
public static void sortConstructors(Constructor<?>[] constructors) {
Arrays.sort(constructors, (c1, c2) -> {
boolean p1 = Modifier.isPublic(c1.getModifiers());
boolean p2 = Modifier.isPublic(c2.getModifiers());
if (p1 != p2) {
return (p1 ? -1 : 1);
}
int c1pl = c1.getParameterCount();
int c2pl = c2.getParameterCount();
return (c1pl < c2pl ? 1 : (c1pl > c2pl ? -1 : 0));
});
boolean p1 = Modifier.isPublic(c1.getModifiers());
boolean p2 = Modifier.isPublic(c2.getModifiers());
if (p1 != p2) {
return (p1 ? -1 : 1);
}
int c1pl = c1.getParameterCount();
int c2pl = c2.getParameterCount();
return (c1pl < c2pl ? 1 : (c1pl > c2pl ? -1 : 0));
});
}
/**
@ -78,15 +78,15 @@ abstract class AutowireUtils {
*/
public static void sortFactoryMethods(Method[] factoryMethods) {
Arrays.sort(factoryMethods, (fm1, fm2) -> {
boolean p1 = Modifier.isPublic(fm1.getModifiers());
boolean p2 = Modifier.isPublic(fm2.getModifiers());
if (p1 != p2) {
return (p1 ? -1 : 1);
}
int c1pl = fm1.getParameterCount();
int c2pl = fm2.getParameterCount();
return (c1pl < c2pl ? 1 : (c1pl > c2pl ? -1 : 0));
});
boolean p1 = Modifier.isPublic(fm1.getModifiers());
boolean p2 = Modifier.isPublic(fm2.getModifiers());
if (p1 != p2) {
return (p1 ? -1 : 1);
}
int c1pl = fm1.getParameterCount();
int c2pl = fm2.getParameterCount();
return (c1pl < c2pl ? 1 : (c1pl > c2pl ? -1 : 0));
});
}
/**

View File

@ -78,7 +78,7 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean
public void setBeanFactory(BeanFactory beanFactory) {
if (!(beanFactory instanceof ConfigurableListableBeanFactory)) {
throw new IllegalArgumentException(
"Bean configurer aspect needs to run in a ConfigurableListableBeanFactory: " + beanFactory);
"Bean configurer aspect needs to run in a ConfigurableListableBeanFactory: " + beanFactory);
}
this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
if (this.beanWiringInfoResolver == null) {

View File

@ -190,7 +190,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
private DataSource nonTransactionalDataSource;
@Nullable
private Map<String, ?> schedulerContextMap;
private Map<String, ?> schedulerContextMap;
@Nullable
private ApplicationContext applicationContext;

View File

@ -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.
@ -122,7 +122,7 @@ public class GenericGroovyApplicationContext extends GenericApplicationContext i
private final BeanWrapper contextWrapper = new BeanWrapperImpl(this);
private MetaClass metaClass = GroovySystem.getMetaClassRegistry().getMetaClass(getClass());
private MetaClass metaClass = GroovySystem.getMetaClassRegistry().getMetaClass(getClass());
/**
@ -229,7 +229,7 @@ public class GenericGroovyApplicationContext extends GenericApplicationContext i
this.metaClass = metaClass;
}
public MetaClass getMetaClass() {
public MetaClass getMetaClass() {
return this.metaClass;
}
@ -247,7 +247,7 @@ public class GenericGroovyApplicationContext extends GenericApplicationContext i
}
@Nullable
public Object getProperty(String property) {
public Object getProperty(String property) {
if (containsBean(property)) {
return getBean(property);
}

View File

@ -85,7 +85,7 @@ public final class CharSequenceEncoder extends AbstractEncoder<CharSequence> {
charset = mimeType.getCharset();
}
else {
charset = DEFAULT_CHARSET;
charset = DEFAULT_CHARSET;
}
return charset;
}

View File

@ -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.
@ -88,7 +88,7 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte
logger.debug("Could not read super class [" + metadata.getSuperClassName() +
"] of type-filtered class [" + metadata.getClassName() + "]");
}
}
}
}
}

View File

@ -199,7 +199,7 @@ public class ExponentialBackOff implements BackOff {
return maxInterval;
}
else if (this.currentInterval < 0) {
long initialInterval = getInitialInterval();
long initialInterval = getInitialInterval();
this.currentInterval = (initialInterval < maxInterval
? initialInterval : maxInterval);
}

View File

@ -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.
@ -27,13 +27,13 @@ import org.springframework.expression.spel.SpelMessage;
/**
* Represents a bean reference to a type, for example <tt>@foo</tt> or <tt>@'foo.bar'</tt>.
* For a FactoryBean the syntax <tt>&foo</tt> can be used to access the factory itself.
*
*
* @author Andy Clement
*/
public class BeanReference extends SpelNodeImpl {
private static final String FACTORY_BEAN_PREFIX = "&";
private final String beanName;

View File

@ -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.
@ -42,16 +42,16 @@ public class BooleanLiteral extends Literal {
public BooleanTypedValue getLiteralValue() {
return this.value;
}
@Override
public boolean isCompilable() {
return true;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
if (this.value == BooleanTypedValue.TRUE) {
mv.visitLdcInsn(1);
mv.visitLdcInsn(1);
}
else {
mv.visitLdcInsn(0);

View File

@ -161,7 +161,7 @@ public class ConstructorReference extends SpelNodeImpl {
if (executorToUse instanceof ReflectiveConstructorExecutor) {
this.exitTypeDescriptor = CodeFlow.toDescriptor(
((ReflectiveConstructorExecutor) executorToUse).getConstructor().getDeclaringClass());
}
return executorToUse.execute(state.getEvaluationContext(), arguments);
}
@ -422,10 +422,10 @@ public class ConstructorReference extends SpelNodeImpl {
private boolean hasInitializer() {
return (getChildCount() > 1);
}
@Override
public boolean isCompilable() {
if (!(this.cachedExecutor instanceof ReflectiveConstructorExecutor) ||
if (!(this.cachedExecutor instanceof ReflectiveConstructorExecutor) ||
this.exitTypeDescriptor == null) {
return false;
}
@ -446,7 +446,7 @@ public class ConstructorReference extends SpelNodeImpl {
return (Modifier.isPublic(constructor.getModifiers()) &&
Modifier.isPublic(constructor.getDeclaringClass().getModifiers()));
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
ReflectiveConstructorExecutor executor = ((ReflectiveConstructorExecutor) this.cachedExecutor);
@ -460,7 +460,7 @@ public class ConstructorReference extends SpelNodeImpl {
// children[0] is the type of the constructor, don't want to include that in argument processing
SpelNodeImpl[] arguments = new SpelNodeImpl[this.children.length - 1];
System.arraycopy(this.children, 1, arguments, 0, this.children.length - 1);
generateCodeForArguments(mv, cf, constructor, arguments);
generateCodeForArguments(mv, cf, constructor, arguments);
mv.visitMethodInsn(INVOKESPECIAL, classDesc, "<init>", CodeFlow.createSignatureDescriptor(constructor), false);
cf.pushDescriptor(this.exitTypeDescriptor);
}

View File

@ -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.
@ -48,7 +48,7 @@ public class FloatLiteral extends Literal {
public boolean isCompilable() {
return true;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
mv.visitLdcInsn(this.value.getValue());

View File

@ -163,7 +163,7 @@ public class FunctionReference extends SpelNodeImpl {
}
return arguments;
}
@Override
public boolean isCompilable() {
Method method = this.method;
@ -182,8 +182,8 @@ public class FunctionReference extends SpelNodeImpl {
}
return true;
}
@Override
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
Method method = this.method;
Assert.state(method != null, "No method handle");

View File

@ -190,7 +190,7 @@ public class Indexer extends SpelNodeImpl {
throw new SpelEvaluationException(
getStartPosition(), SpelMessage.INDEXING_NOT_SUPPORTED_FOR_TYPE, targetDescriptor);
}
@Override
public boolean isCompilable() {
if (this.indexedType == IndexedType.ARRAY) {
@ -210,7 +210,7 @@ public class Indexer extends SpelNodeImpl {
}
return false;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
String descriptor = cf.lastDescriptor();
@ -249,7 +249,7 @@ public class Indexer extends SpelNodeImpl {
mv.visitTypeInsn(CHECKCAST, "[C");
insn = CALOAD;
}
else {
else {
mv.visitTypeInsn(CHECKCAST, "["+ this.exitTypeDescriptor +
(CodeFlow.isPrimitiveArray(this.exitTypeDescriptor) ? "" : ";"));
//depthPlusOne(exitTypeDescriptor)+"Ljava/lang/Object;");
@ -286,7 +286,7 @@ public class Indexer extends SpelNodeImpl {
}
mv.visitMethodInsn(
INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true);
}
}
else if (this.indexedType == IndexedType.OBJECT) {
ReflectivePropertyAccessor.OptimalPropertyAccessor accessor =
@ -313,7 +313,7 @@ public class Indexer extends SpelNodeImpl {
mv.visitFieldInsn((isStatic ? GETSTATIC : GETFIELD), classDesc, member.getName(),
CodeFlow.toJvmDescriptor(((Field) member).getType()));
}
}
}
cf.pushDescriptor(this.exitTypeDescriptor);
}

View File

@ -128,12 +128,12 @@ public class InlineList extends SpelNodeImpl {
Assert.state(this.constant != null, "No constant");
return (List<Object>) this.constant.getValue();
}
@Override
public boolean isCompilable() {
return isConstant();
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow codeflow) {
final String constantFieldName = "inlineList$" + codeflow.nextFieldId();
@ -144,11 +144,11 @@ public class InlineList extends SpelNodeImpl {
codeflow.registerNewClinit((mVisitor, cflow) ->
generateClinitCode(className, constantFieldName, mVisitor, cflow, false));
mv.visitFieldInsn(GETSTATIC, className, constantFieldName, "Ljava/util/List;");
codeflow.pushDescriptor("Ljava/util/List");
}
void generateClinitCode(String clazzname, String constantFieldName, MethodVisitor mv, CodeFlow codeflow, boolean nested) {
mv.visitTypeInsn(NEW, "java/util/ArrayList");
mv.visitInsn(DUP);

View File

@ -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.
@ -70,7 +70,7 @@ public class InlineMap extends SpelNodeImpl {
break;
}
}
else if (!((c%2)==0 && (child instanceof PropertyOrFieldReference))) {
else if (!((c%2)==0 && (child instanceof PropertyOrFieldReference))) {
isConstant = false;
break;
}

View File

@ -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.
@ -48,7 +48,7 @@ public class IntLiteral extends Literal {
public boolean isCompilable() {
return true;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
Integer intValue = (Integer) this.value.getValue();

View File

@ -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.
@ -42,12 +42,12 @@ public class LongLiteral extends Literal {
public TypedValue getLiteralValue() {
return this.value;
}
@Override
public boolean isCompilable() {
return true;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
mv.visitLdcInsn(this.value.getValue());

View File

@ -301,7 +301,7 @@ public class MethodReference extends SpelNodeImpl {
return true;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
CachedMethodExecutor executorToCheck = this.cachedExecutor;
@ -332,7 +332,7 @@ public class MethodReference extends SpelNodeImpl {
// Something on the stack when nothing is needed
mv.visitInsn(POP);
}
if (CodeFlow.isPrimitive(descriptor)) {
CodeFlow.insertBoxIfNecessary(mv, descriptor.charAt(0));
}

View File

@ -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.
@ -48,7 +48,7 @@ public class NullLiteral extends Literal {
public boolean isCompilable() {
return true;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
mv.visitInsn(ACONST_NULL);

View File

@ -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.
@ -78,7 +78,7 @@ public class OpAnd extends Operator {
CodeFlow.isBooleanCompatible(left.exitTypeDescriptor) &&
CodeFlow.isBooleanCompatible(right.exitTypeDescriptor));
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
// Pseudo: if (!leftOperandValue) { result=false; } else { result=rightOperandValue; }

View File

@ -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.
@ -95,13 +95,13 @@ public class OpDivide extends Operator {
return false;
}
if (this.children.length > 1) {
if (!getRightOperand().isCompilable()) {
return false;
}
if (!getRightOperand().isCompilable()) {
return false;
}
}
return (this.exitTypeDescriptor != null);
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
getLeftOperand().generateCode(mv, cf);
@ -123,12 +123,12 @@ public class OpDivide extends Operator {
case 'J':
mv.visitInsn(LDIV);
break;
case 'F':
case 'F':
mv.visitInsn(FDIV);
break;
case 'D':
mv.visitInsn(DDIV);
break;
break;
default:
throw new IllegalStateException(
"Unrecognized exit type descriptor: '" + this.exitTypeDescriptor + "'");

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@ -49,7 +49,7 @@ public class OpGE extends Operator {
this.leftActualDescriptor = CodeFlow.toDescriptorFromObject(left);
this.rightActualDescriptor = CodeFlow.toDescriptorFromObject(right);
if (left instanceof Number && right instanceof Number) {
Number leftNumber = (Number) left;
Number rightNumber = (Number) right;
@ -90,12 +90,12 @@ public class OpGE extends Operator {
return BooleanTypedValue.forValue(state.getTypeComparator().compare(left, right) >= 0);
}
@Override
public boolean isCompilable() {
return isCompilableOperatorUsingNumerics();
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
generateComparisonCode(mv, cf, IFLT, IF_ICMPLT);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@ -49,7 +49,7 @@ public class OpGT extends Operator {
this.leftActualDescriptor = CodeFlow.toDescriptorFromObject(left);
this.rightActualDescriptor = CodeFlow.toDescriptorFromObject(right);
if (left instanceof Number && right instanceof Number) {
Number leftNumber = (Number) left;
Number rightNumber = (Number) right;
@ -100,7 +100,7 @@ public class OpGT extends Operator {
public boolean isCompilable() {
return isCompilableOperatorUsingNumerics();
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
generateComparisonCode(mv, cf, IFLE, IF_ICMPLE);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@ -49,7 +49,7 @@ public class OpLE extends Operator {
this.leftActualDescriptor = CodeFlow.toDescriptorFromObject(left);
this.rightActualDescriptor = CodeFlow.toDescriptorFromObject(right);
if (left instanceof Number && right instanceof Number) {
Number leftNumber = (Number) left;
Number rightNumber = (Number) right;
@ -90,12 +90,12 @@ public class OpLE extends Operator {
return BooleanTypedValue.forValue(state.getTypeComparator().compare(left, right) <= 0);
}
@Override
public boolean isCompilable() {
return isCompilableOperatorUsingNumerics();
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
generateComparisonCode(mv, cf, IFGT, IF_ICMPGT);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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,12 +95,12 @@ public class OpLT extends Operator {
return BooleanTypedValue.forValue(state.getTypeComparator().compare(left, right) < 0);
}
@Override
public boolean isCompilable() {
return isCompilableOperatorUsingNumerics();
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
generateComparisonCode(mv, cf, IFGE, IF_ICMPGE);

View File

@ -93,9 +93,9 @@ public class OpModulus extends Operator {
return false;
}
if (this.children.length > 1) {
if (!getRightOperand().isCompilable()) {
return false;
}
if (!getRightOperand().isCompilable()) {
return false;
}
}
return (this.exitTypeDescriptor != null);
}
@ -121,12 +121,12 @@ public class OpModulus extends Operator {
case 'J':
mv.visitInsn(LREM);
break;
case 'F':
case 'F':
mv.visitInsn(FREM);
break;
case 'D':
mv.visitInsn(DREM);
break;
break;
default:
throw new IllegalStateException(
"Unrecognized exit type descriptor: '" + this.exitTypeDescriptor + "'");

View File

@ -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.
@ -126,13 +126,13 @@ public class OpMultiply extends Operator {
return false;
}
if (this.children.length > 1) {
if (!getRightOperand().isCompilable()) {
return false;
}
if (!getRightOperand().isCompilable()) {
return false;
}
}
return (this.exitTypeDescriptor != null);
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
getLeftOperand().generateCode(mv, cf);
@ -154,12 +154,12 @@ public class OpMultiply extends Operator {
case 'J':
mv.visitInsn(LMUL);
break;
case 'F':
case 'F':
mv.visitInsn(FMUL);
break;
case 'D':
mv.visitInsn(DMUL);
break;
break;
default:
throw new IllegalStateException(
"Unrecognized exit type descriptor: '" + this.exitTypeDescriptor + "'");

View File

@ -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.
@ -77,7 +77,7 @@ public class OpOr extends Operator {
CodeFlow.isBooleanCompatible(left.exitTypeDescriptor) &&
CodeFlow.isBooleanCompatible(right.exitTypeDescriptor));
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
// pseudo: if (leftOperandValue) { result=true; } else { result=rightOperandValue; }
@ -98,5 +98,5 @@ public class OpOr extends Operator {
mv.visitLabel(endOfIf);
cf.pushDescriptor(this.exitTypeDescriptor);
}
}

View File

@ -178,9 +178,9 @@ public class OpPlus extends Operator {
return false;
}
if (this.children.length > 1) {
if (!getRightOperand().isCompilable()) {
return false;
}
if (!getRightOperand().isCompilable()) {
return false;
}
}
return (this.exitTypeDescriptor != null);
}

View File

@ -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.
@ -39,7 +39,7 @@ public class OperatorInstanceof extends Operator {
@Nullable
private Class<?> type;
public OperatorInstanceof(int pos, SpelNodeImpl... operands) {
super("instanceof", pos, operands);
@ -76,7 +76,7 @@ public class OperatorInstanceof extends Operator {
}
this.type = rightClass;
if (rightOperand instanceof TypeReference) {
// Can only generate bytecode where the right operand is a direct type reference,
// Can only generate bytecode where the right operand is a direct type reference,
// not if it is indirect (for example when right operand is a variable reference)
this.exitTypeDescriptor = "Z";
}
@ -87,7 +87,7 @@ public class OperatorInstanceof extends Operator {
public boolean isCompilable() {
return (this.exitTypeDescriptor != null && getLeftOperand().isCompilable());
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
getLeftOperand().generateCode(mv, cf);
@ -98,7 +98,7 @@ public class OperatorInstanceof extends Operator {
// in case it had side effects
mv.visitInsn(POP);
mv.visitInsn(ICONST_0); // value of false
}
}
else {
mv.visitTypeInsn(INSTANCEOF, Type.getInternalName(this.type));
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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,20 +60,20 @@ public class OperatorNot extends SpelNodeImpl { // Not is a unary operator so d
public String toStringAST() {
return "!" + getChild(0).toStringAST();
}
@Override
public boolean isCompilable() {
SpelNodeImpl child = this.children[0];
return (child.isCompilable() && CodeFlow.isBooleanCompatible(child.exitTypeDescriptor));
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
this.children[0].generateCode(mv, cf);
cf.unboxBooleanIfNecessary(mv);
Label elseTarget = new Label();
Label endOfIf = new Label();
mv.visitJumpInsn(IFNE,elseTarget);
mv.visitJumpInsn(IFNE,elseTarget);
mv.visitInsn(ICONST_1); // TRUE
mv.visitJumpInsn(GOTO,endOfIf);
mv.visitLabel(elseTarget);

View File

@ -328,14 +328,14 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
resolvers.addAll(generalAccessors);
return resolvers;
}
@Override
public boolean isCompilable() {
PropertyAccessor accessorToUse = this.cachedReadAccessor;
return (accessorToUse instanceof CompilablePropertyAccessor &&
((CompilablePropertyAccessor) accessorToUse).isCompilable());
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
PropertyAccessor accessorToUse = this.cachedReadAccessor;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@ -47,7 +47,7 @@ public class RealLiteral extends Literal {
public boolean isCompilable() {
return true;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
mv.visitLdcInsn(this.value.getValue());

View File

@ -194,7 +194,7 @@ public abstract class SpelNodeImpl implements SpelNode, Opcodes {
public abstract TypedValue getValueInternal(ExpressionState expressionState) throws EvaluationException;
/**
* Generate code that handles building the argument values for the specified method.
* This method will take account of whether the invoked method is a varargs method
@ -222,12 +222,12 @@ public abstract class SpelNodeImpl implements SpelNode, Opcodes {
// have been passed to satisfy the varargs and so something needs to be built.
int p = 0; // Current supplied argument being processed
int childCount = arguments.length;
// Fulfill all the parameter requirements except the last one
for (p = 0; p < paramDescriptors.length - 1; p++) {
generateCodeForArgument(mv, cf, arguments[p], paramDescriptors[p]);
}
SpelNodeImpl lastChild = (childCount == 0 ? null : arguments[childCount - 1]);
String arrayType = paramDescriptors[paramDescriptors.length - 1];
// Determine if the final passed argument is already suitably packaged in array

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@ -49,12 +49,12 @@ public class StringLiteral extends Literal {
public String toString() {
return "'" + getLiteralValue().getValue() + "'";
}
@Override
public boolean isCompilable() {
return true;
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
mv.visitLdcInsn(this.value.getValue());

View File

@ -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.
@ -59,7 +59,7 @@ public class Ternary extends SpelNodeImpl {
computeExitTypeDescriptor();
return result;
}
@Override
public String toStringAST() {
return getChild(0).toStringAST() + " ? " + getChild(1).toStringAST() + " : " + getChild(2).toStringAST();
@ -89,7 +89,7 @@ public class Ternary extends SpelNodeImpl {
CodeFlow.isBooleanCompatible(condition.exitTypeDescriptor) &&
left.exitTypeDescriptor != null && right.exitTypeDescriptor != null);
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
// May reach here without it computed if all elements are literals

View File

@ -78,7 +78,7 @@ public class VariableReference extends SpelNodeImpl {
if (value == null || !Modifier.isPublic(value.getClass().getModifiers())) {
// If the type is not public then when generateCode produces a checkcast to it
// then an IllegalAccessError will occur.
// If resorting to Object isn't sufficient, the hierarchy could be traversed for
// If resorting to Object isn't sufficient, the hierarchy could be traversed for
// the first public type.
this.exitTypeDescriptor = "Ljava/lang/Object";
}
@ -108,7 +108,7 @@ public class VariableReference extends SpelNodeImpl {
public boolean isCompilable() {
return (this.exitTypeDescriptor != null);
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
if (this.name.equals(ROOT)) {

View File

@ -385,10 +385,10 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
@Nullable
protected Method findGetterForProperty(String propertyName, Class<?> clazz, boolean mustBeStatic) {
Method method = findMethodForProperty(getPropertyMethodSuffixes(propertyName),
"get", clazz, mustBeStatic, 0, ANY_TYPES);
"get", clazz, mustBeStatic, 0, ANY_TYPES);
if (method == null) {
method = findMethodForProperty(getPropertyMethodSuffixes(propertyName),
"is", clazz, mustBeStatic, 0, BOOLEAN_TYPES);
"is", clazz, mustBeStatic, 0, BOOLEAN_TYPES);
}
return method;
}

View File

@ -203,7 +203,7 @@ public class StandardEvaluationContext implements EvaluationContext {
@Override
public TypeConverter getTypeConverter() {
if (this.typeConverter == null) {
this.typeConverter = new StandardTypeConverter();
this.typeConverter = new StandardTypeConverter();
}
return this.typeConverter;
}

View File

@ -129,17 +129,17 @@ public interface Log {
void fatal(Object message, Throwable t);
/**
* Logs a message with error log level.
* @param message log this message
*/
void error(Object message);
* Logs a message with error log level.
* @param message log this message
*/
void error(Object message);
/**
* Logs an error with error log level.
* @param message log this message
* @param t log this cause
*/
void error(Object message, Throwable t);
/**
* Logs an error with error log level.
* @param message log this message
* @param t log this cause
*/
void error(Object message, Throwable t);
/**
* Logs a message with warn log level.
@ -154,18 +154,18 @@ public interface Log {
*/
void warn(Object message, Throwable t);
/**
* Logs a message with info log level.
* @param message log this message
*/
void info(Object message);
/**
* Logs a message with info log level.
* @param message log this message
*/
void info(Object message);
/**
* Logs an error with info log level.
* @param message log this message
* @param t log this cause
*/
void info(Object message, Throwable t);
/**
* Logs an error with info log level.
* @param message log this message
* @param t log this cause
*/
void info(Object message, Throwable t);
/**
* Logs a message with debug log level.
@ -181,16 +181,16 @@ public interface Log {
void debug(Object message, Throwable t);
/**
* Logs a message with trace log level.
* @param message log this message
*/
void trace(Object message);
* Logs a message with trace log level.
* @param message log this message
*/
void trace(Object message);
/**
* Logs an error with trace log level.
* @param message log this message
* @param t log this cause
*/
void trace(Object message, Throwable t);
/**
* Logs an error with trace log level.
* @param message log this message
* @param t log this cause
*/
void trace(Object message, Throwable t);
}

View File

@ -90,20 +90,20 @@ public interface TableMetaDataProvider {
/**
* Are we using the meta-data for the table columns?
*/
boolean isTableColumnMetaDataUsed();
boolean isTableColumnMetaDataUsed();
/**
* Does this database support the JDBC 3.0 feature of retrieving generated keys:
* {@link java.sql.DatabaseMetaData#supportsGetGeneratedKeys()}?
*/
boolean isGetGeneratedKeysSupported();
boolean isGetGeneratedKeysSupported();
/**
* Does this database support a simple query to retrieve the generated key when
* the JDBC 3.0 feature of retrieving generated keys is not supported?
* @see #isGetGeneratedKeysSupported()
*/
boolean isGetGeneratedKeysSimulated();
boolean isGetGeneratedKeysSimulated();
/**
* Get the simple query to retrieve a generated key.
@ -115,7 +115,7 @@ public interface TableMetaDataProvider {
* Does this database support a column name String array for retrieving generated keys:
* {@link java.sql.Connection#createStruct(String, Object[])}?
*/
boolean isGeneratedKeysColumnNameArraySupported();
boolean isGeneratedKeysColumnNameArraySupported();
/**
* Get the table parameter meta-data that is currently used.

View File

@ -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.
@ -50,7 +50,7 @@ public class NamedParameterJdbcDaoSupport extends JdbcDaoSupport {
*/
@Nullable
public NamedParameterJdbcTemplate getNamedParameterJdbcTemplate() {
return this.namedParameterJdbcTemplate;
return this.namedParameterJdbcTemplate;
}
}

View File

@ -96,7 +96,7 @@ public abstract class JdbcDaoSupport extends DaoSupport {
*/
@Nullable
public final JdbcTemplate getJdbcTemplate() {
return this.jdbcTemplate;
return this.jdbcTemplate;
}
/**

View File

@ -228,7 +228,7 @@ public abstract class SqlQuery<T> extends SqlOperation {
String sqlToUse = NamedParameterUtils.substituteNamedParameters(parsedSql, paramSource);
Object[] params = NamedParameterUtils.buildValueArray(parsedSql, paramSource, getDeclaredParameters());
RowMapper<T> rowMapper = newRowMapper(params, context);
return getJdbcTemplate().query(newPreparedStatementCreator(sqlToUse, params), rowMapper);
return getJdbcTemplate().query(newPreparedStatementCreator(sqlToUse, params), rowMapper);
}
/**

View File

@ -72,7 +72,7 @@ public @interface SendToUser {
* or only to the session of the input message being handled.
* <p>By default, this is set to {@code true} in which case messages are
* broadcast to all sessions.
*/
boolean broadcast() default true;
*/
boolean broadcast() default true;
}

View File

@ -467,8 +467,8 @@ public class MessageHeaderAccessor {
@Nullable
public Object getReplyChannel() {
return getHeader(MessageHeaders.REPLY_CHANNEL);
}
return getHeader(MessageHeaders.REPLY_CHANNEL);
}
public void setErrorChannelName(String errorChannelName) {
setHeader(MessageHeaders.ERROR_CHANNEL, errorChannelName);
@ -480,8 +480,8 @@ public class MessageHeaderAccessor {
@Nullable
public Object getErrorChannel() {
return getHeader(MessageHeaders.ERROR_CHANNEL);
}
return getHeader(MessageHeaders.ERROR_CHANNEL);
}
// Log message stuff

View File

@ -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.
@ -113,7 +113,7 @@ public abstract class HibernateDaoSupport extends DaoSupport {
*/
@Nullable
public final HibernateTemplate getHibernateTemplate() {
return this.hibernateTemplate;
return this.hibernateTemplate;
}
@Override

View File

@ -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.
@ -311,12 +311,12 @@ public class PersistenceAnnotationBeanPostProcessor
}
public void setOrder(int order) {
this.order = order;
this.order = order;
}
@Override
public int getOrder() {
return this.order;
return this.order;
}
@Override

View File

@ -767,7 +767,7 @@ public class XStreamMarshaller extends AbstractMarshaller implements BeanClassLo
else {
throw new IllegalArgumentException("DOMSource contains neither Document nor Element");
}
return doUnmarshal(streamReader, null);
return doUnmarshal(streamReader, null);
}
@Override
@ -783,7 +783,7 @@ public class XStreamMarshaller extends AbstractMarshaller implements BeanClassLo
@Override
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException {
return doUnmarshal(new StaxReader(new QNameMap(), streamReader, this.nameCoder), null);
return doUnmarshal(new StaxReader(new QNameMap(), streamReader, this.nameCoder), null);
}
@Override
@ -800,12 +800,12 @@ public class XStreamMarshaller extends AbstractMarshaller implements BeanClassLo
}
public Object unmarshalInputStream(InputStream inputStream, @Nullable DataHolder dataHolder) throws XmlMappingException, IOException {
if (this.streamDriver != null) {
return doUnmarshal(this.streamDriver.createReader(inputStream), dataHolder);
}
else {
return unmarshalReader(new InputStreamReader(inputStream, this.encoding), dataHolder);
}
if (this.streamDriver != null) {
return doUnmarshal(this.streamDriver.createReader(inputStream), dataHolder);
}
else {
return unmarshalReader(new InputStreamReader(inputStream, this.encoding), dataHolder);
}
}
@Override

View File

@ -94,7 +94,7 @@ public class MockAsyncContext implements AsyncContext {
@Override
public void dispatch() {
dispatch(this.request.getRequestURI());
}
}
@Override
public void dispatch(String path) {

View File

@ -71,7 +71,7 @@ public interface MvcResult {
* @return an exception, or {@code null} if none
*/
@Nullable
Exception getResolvedException();
Exception getResolvedException();
/**
* Return the "output" flash attributes saved during request processing.

View File

@ -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.
@ -269,11 +269,11 @@ public abstract class MockMvcRequestBuilders {
mvcResult.getAsyncResult();
return servletContext -> {
MockHttpServletRequest request = mvcResult.getRequest();
request.setDispatcherType(DispatcherType.ASYNC);
request.setAsyncStarted(false);
return request;
};
MockHttpServletRequest request = mvcResult.getRequest();
request.setDispatcherType(DispatcherType.ASYNC);
request.setAsyncStarted(false);
return request;
};
}
}

View File

@ -81,17 +81,17 @@ public class ModelResultMatchers {
};
}
/**
* Assert the given model attributes do not exist.
*/
public ResultMatcher attributeDoesNotExist(final String... names) {
return result -> {
/**
* Assert the given model attributes do not exist.
*/
public ResultMatcher attributeDoesNotExist(final String... names) {
return result -> {
ModelAndView mav = getModelAndView(result);
for (String name : names) {
assertTrue("Model attribute '" + name + "' exists", mav.getModel().get(name) == null);
}
};
}
}
/**
* Assert the given model attribute(s) have errors.

View File

@ -445,31 +445,31 @@ public class StatusResultMatchers {
}
/**
* Assert the response status code is {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE} (419).
* @deprecated matching the deprecation of {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE}
*/
@Deprecated
public ResultMatcher isInsufficientSpaceOnResource() {
return matcher(HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE);
}
* Assert the response status code is {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE} (419).
* @deprecated matching the deprecation of {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE}
*/
@Deprecated
public ResultMatcher isInsufficientSpaceOnResource() {
return matcher(HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE);
}
/**
* Assert the response status code is {@code HttpStatus.METHOD_FAILURE} (420).
* @deprecated matching the deprecation of {@code HttpStatus.METHOD_FAILURE}
*/
@Deprecated
public ResultMatcher isMethodFailure() {
return matcher(HttpStatus.METHOD_FAILURE);
}
/**
* Assert the response status code is {@code HttpStatus.METHOD_FAILURE} (420).
* @deprecated matching the deprecation of {@code HttpStatus.METHOD_FAILURE}
*/
@Deprecated
public ResultMatcher isMethodFailure() {
return matcher(HttpStatus.METHOD_FAILURE);
}
/**
* Assert the response status code is {@code HttpStatus.DESTINATION_LOCKED} (421).
* @deprecated matching the deprecation of {@code HttpStatus.DESTINATION_LOCKED}
*/
@Deprecated
public ResultMatcher isDestinationLocked() {
return matcher(HttpStatus.DESTINATION_LOCKED);
}
/**
* Assert the response status code is {@code HttpStatus.DESTINATION_LOCKED} (421).
* @deprecated matching the deprecation of {@code HttpStatus.DESTINATION_LOCKED}
*/
@Deprecated
public ResultMatcher isDestinationLocked() {
return matcher(HttpStatus.DESTINATION_LOCKED);
}
/**
* Assert the response status code is {@code HttpStatus.UNPROCESSABLE_ENTITY} (422).

View File

@ -56,7 +56,7 @@ public abstract class CciDaoSupport extends DaoSupport {
*/
public final void setConnectionFactory(ConnectionFactory connectionFactory) {
if (this.cciTemplate == null || connectionFactory != this.cciTemplate.getConnectionFactory()) {
this.cciTemplate = createCciTemplate(connectionFactory);
this.cciTemplate = createCciTemplate(connectionFactory);
}
}
@ -95,7 +95,7 @@ public abstract class CciDaoSupport extends DaoSupport {
*/
@Nullable
public final CciTemplate getCciTemplate() {
return this.cciTemplate;
return this.cciTemplate;
}
@Override

View File

@ -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.
@ -159,7 +159,7 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
}
private HttpAsyncClient startAsyncClient() {
HttpAsyncClient client = getAsyncClient();
HttpAsyncClient client = getAsyncClient();
if (client instanceof CloseableHttpAsyncClient) {
CloseableHttpAsyncClient closeableAsyncClient = (CloseableHttpAsyncClient) client;
if (!closeableAsyncClient.isRunning()) {
@ -175,10 +175,10 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
HttpUriRequest httpRequest = createHttpUriRequest(httpMethod, uri);
postProcessHttpRequest(httpRequest);
HttpContext context = createHttpContext(httpMethod, uri);
if (context == null) {
context = HttpClientContext.create();
}
HttpContext context = createHttpContext(httpMethod, uri);
if (context == null) {
context = HttpClientContext.create();
}
// Request configuration not set in the context
if (context.getAttribute(HttpClientContext.REQUEST_CONFIG) == null) {

View File

@ -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,21 +82,21 @@ final class HttpComponentsClientHttpResponse extends AbstractClientHttpResponse
@Override
public void close() {
// Release underlying connection back to the connection manager
try {
try {
// Attempt to keep connection alive by consuming its remaining content
EntityUtils.consume(this.httpResponse.getEntity());
}
// Release underlying connection back to the connection manager
try {
try {
// Attempt to keep connection alive by consuming its remaining content
EntityUtils.consume(this.httpResponse.getEntity());
}
finally {
if (this.httpResponse instanceof Closeable) {
((Closeable) this.httpResponse).close();
}
}
}
catch (IOException ex) {
}
}
catch (IOException ex) {
// Ignore exception on close...
}
}
}
}

View File

@ -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.
@ -38,7 +38,7 @@ import org.springframework.util.MultiValueMap;
* @since 5.0
*/
public class ClientHttpRequestDecorator implements ClientHttpRequest {
private final ClientHttpRequest delegate;

View File

@ -33,7 +33,7 @@ import org.springframework.util.MultiValueMap;
* @since 5.0
*/
public class ClientHttpResponseDecorator implements ClientHttpResponse {
private final ClientHttpResponse delegate;

View File

@ -35,63 +35,63 @@ import org.springframework.lang.Nullable;
public final class ServerSentEvent<T> {
@Nullable
private final String id;
private final String id;
@Nullable
private final String event;
private final String event;
@Nullable
private final Duration retry;
private final Duration retry;
@Nullable
private final String comment;
private final String comment;
@Nullable
private final T data;
private ServerSentEvent(@Nullable String id, @Nullable String event, @Nullable Duration retry,
private ServerSentEvent(@Nullable String id, @Nullable String event, @Nullable Duration retry,
@Nullable String comment, @Nullable T data) {
this.id = id;
this.event = event;
this.retry = retry;
this.comment = comment;
this.id = id;
this.event = event;
this.retry = retry;
this.comment = comment;
this.data = data;
}
}
/**
* Return the {@code id} field of this event, if available.
*/
@Nullable
public String id() {
return this.id;
}
/**
* Return the {@code event} field of this event, if available.
*/
/**
* Return the {@code id} field of this event, if available.
*/
@Nullable
public String event() {
return this.event;
}
public String id() {
return this.id;
}
/**
* Return the {@code retry} field of this event, if available.
*/
/**
* Return the {@code event} field of this event, if available.
*/
@Nullable
public Duration retry() {
return this.retry;
}
public String event() {
return this.event;
}
/**
* Return the comment of this event, if available.
*/
/**
* Return the {@code retry} field of this event, if available.
*/
@Nullable
public String comment() {
return this.comment;
}
public Duration retry() {
return this.retry;
}
/**
* Return the comment of this event, if available.
*/
@Nullable
public String comment() {
return this.comment;
}
/**
* Return the {@code data} field of this event, if available.
@ -102,11 +102,11 @@ public final class ServerSentEvent<T> {
}
@Override
public String toString() {
return ("ServerSentEvent [id = '" + this.id + "\', event='" + this.event + "\', retry=" +
@Override
public String toString() {
return ("ServerSentEvent [id = '" + this.id + "\', event='" + this.event + "\', retry=" +
this.retry + ", comment='" + this.comment + "', data=" + this.data + ']');
}
}
/**
@ -128,41 +128,41 @@ public final class ServerSentEvent<T> {
}
/**
* A mutable builder for a {@code SseEvent}.
*
* @param <T> the type of data that this event contains
*/
public interface Builder<T> {
/**
* A mutable builder for a {@code SseEvent}.
*
* @param <T> the type of data that this event contains
*/
public interface Builder<T> {
/**
* Set the value of the {@code id} field.
* @param id the value of the id field
* @return {@code this} builder
*/
Builder<T> id(String id);
/**
* Set the value of the {@code id} field.
* @param id the value of the id field
* @return {@code this} builder
*/
Builder<T> id(String id);
/**
* Set the value of the {@code event} field.
* @param event the value of the event field
* @return {@code this} builder
*/
Builder<T> event(String event);
/**
* Set the value of the {@code event} field.
* @param event the value of the event field
* @return {@code this} builder
*/
Builder<T> event(String event);
/**
* Set the value of the {@code retry} field.
* @param retry the value of the retry field
* @return {@code this} builder
*/
Builder<T> retry(Duration retry);
/**
* Set the value of the {@code retry} field.
* @param retry the value of the retry field
* @return {@code this} builder
*/
Builder<T> retry(Duration retry);
/**
* Set SSE comment. If a multi-line comment is provided, it will be turned into multiple
* SSE comment lines as defined in Server-Sent Events W3C recommendation.
* @param comment the comment to set
* @return {@code this} builder
*/
Builder<T> comment(String comment);
/**
* Set SSE comment. If a multi-line comment is provided, it will be turned into multiple
* SSE comment lines as defined in Server-Sent Events W3C recommendation.
* @param comment the comment to set
* @return {@code this} builder
*/
Builder<T> comment(String comment);
/**
* Set the value of the {@code data} field. If the {@code data} argument is a multi-line
@ -174,61 +174,61 @@ public final class ServerSentEvent<T> {
*/
Builder<T> data(@Nullable T data);
/**
* Builds the event.
* @return the built event
*/
ServerSentEvent<T> build();
}
/**
* Builds the event.
* @return the built event
*/
ServerSentEvent<T> build();
}
private static class BuilderImpl<T> implements Builder<T> {
private static class BuilderImpl<T> implements Builder<T> {
@Nullable
private String id;
private String id;
@Nullable
private String event;
private String event;
@Nullable
private Duration retry;
private Duration retry;
@Nullable
private String comment;
private String comment;
@Nullable
private T data;
public BuilderImpl() {
}
}
public BuilderImpl(T data) {
this.data = data;
}
public BuilderImpl(T data) {
this.data = data;
}
@Override
public Builder<T> id(String id) {
this.id = id;
return this;
}
@Override
public Builder<T> id(String id) {
this.id = id;
return this;
}
@Override
public Builder<T> event(String event) {
this.event = event;
return this;
}
@Override
public Builder<T> event(String event) {
this.event = event;
return this;
}
@Override
public Builder<T> retry(Duration retry) {
this.retry = retry;
return this;
}
@Override
public Builder<T> retry(Duration retry) {
this.retry = retry;
return this;
}
@Override
public Builder<T> comment(String comment) {
this.comment = comment;
return this;
}
@Override
public Builder<T> comment(String comment) {
this.comment = comment;
return this;
}
@Override
public Builder<T> data(@Nullable T data) {
@ -236,10 +236,10 @@ public final class ServerSentEvent<T> {
return this;
}
@Override
public ServerSentEvent<T> build() {
return new ServerSentEvent<>(this.id, this.event, this.retry, this.comment, this.data);
}
}
@Override
public ServerSentEvent<T> build() {
return new ServerSentEvent<>(this.id, this.event, this.retry, this.comment, this.data);
}
}
}

View File

@ -176,7 +176,7 @@ public abstract class AbstractJackson2Encoder extends Jackson2CodecSupport imple
return buffer;
}
protected ObjectWriter customizeWriter(ObjectWriter writer, @Nullable MimeType mimeType,
ResolvableType elementType, @Nullable Map<String, Object> hints) {
@ -227,5 +227,5 @@ public abstract class AbstractJackson2Encoder extends Jackson2CodecSupport imple
protected <A extends Annotation> A getAnnotation(MethodParameter parameter, Class<A> annotType) {
return parameter.getMethodAnnotation(annotType);
}
}

View File

@ -48,7 +48,7 @@ public class Jackson2JsonEncoder extends AbstractJackson2Encoder {
@Nullable
private final PrettyPrinter ssePrettyPrinter;
public Jackson2JsonEncoder() {
this(Jackson2ObjectMapperBuilder.json().build());
@ -70,7 +70,7 @@ public class Jackson2JsonEncoder extends AbstractJackson2Encoder {
@Override
protected ObjectWriter customizeWriter(ObjectWriter writer, @Nullable MimeType mimeType,
ResolvableType elementType, @Nullable Map<String, Object> hints) {
return (this.ssePrettyPrinter != null &&
MediaType.TEXT_EVENT_STREAM.isCompatibleWith(mimeType) &&
writer.getConfig().isEnabled(SerializationFeature.INDENT_OUTPUT) ?

View File

@ -43,8 +43,8 @@ public class Jackson2SmileEncoder extends AbstractJackson2Encoder {
private static final MimeType[] DEFAULT_SMILE_MIME_TYPES = new MimeType[] {
new MimeType("application", "x-jackson-smile", StandardCharsets.UTF_8),
new MimeType("application", "*+x-jackson-smile", StandardCharsets.UTF_8)};
public Jackson2SmileEncoder() {
this(Jackson2ObjectMapperBuilder.smile().build(), DEFAULT_SMILE_MIME_TYPES);
}

View File

@ -118,7 +118,7 @@ public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implem
private final ReactiveHttpInputMessage inputMessage;
private final DataBufferFactory bufferFactory;
private final PartBodyStreamStorageFactory streamStorageFactory;
SynchronossPartGenerator(ReactiveHttpInputMessage inputMessage, DataBufferFactory bufferFactory,

View File

@ -35,6 +35,6 @@ public interface ExtensionRegistryInitializer {
* Initializes the {@code ExtensionRegistry} with Protocol Message extensions.
* @param registry the registry to populate
*/
void initializeExtensionRegistry(ExtensionRegistry registry);
void initializeExtensionRegistry(ExtensionRegistry registry);
}

View File

@ -108,10 +108,10 @@ class ServletServerHttpRequest extends AbstractServerHttpRequest {
private static HttpHeaders initHeaders(HttpServletRequest request) {
HttpHeaders headers = new HttpHeaders();
for (Enumeration<?> names = request.getHeaderNames();
names.hasMoreElements(); ) {
names.hasMoreElements(); ) {
String name = (String) names.nextElement();
for (Enumeration<?> values = request.getHeaders(name);
values.hasMoreElements(); ) {
values.hasMoreElements(); ) {
headers.add(name, (String) values.nextElement());
}
}

View File

@ -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.
@ -63,10 +63,10 @@ public class HessianServiceExporter extends HessianExporter implements HttpReque
response.setContentType(CONTENT_TYPE_HESSIAN);
try {
invoke(request.getInputStream(), response.getOutputStream());
invoke(request.getInputStream(), response.getOutputStream());
}
catch (Throwable ex) {
throw new NestedServletException("Hessian skeleton invocation failed", ex);
throw new NestedServletException("Hessian skeleton invocation failed", ex);
}
}

View File

@ -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.
@ -28,7 +28,7 @@ import org.springframework.util.Assert;
/**
* Package-private implementation of {@link ServerWebExchange.Builder}.
*
*
* @author Rossen Stoyanchev
* @since 5.0
*/

View File

@ -25,7 +25,7 @@ import org.springframework.web.server.ServerWebExchange;
/**
* Request and response header-based {@link WebSessionIdResolver}.
*
*
* @author Greg Turnquist
* @author Rob Winch
* @since 5.0

View File

@ -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.
@ -58,7 +58,7 @@ public class CookieGenerator {
private String cookiePath = DEFAULT_COOKIE_PATH;
@Nullable
@Nullable
private Integer cookieMaxAge;
private boolean cookieSecure = false;

View File

@ -124,7 +124,7 @@ class HtmlCharacterEntityReferences {
*/
@Nullable
public String convertToReference(char character) {
return convertToReference(character, WebUtils.DEFAULT_CHARACTER_ENCODING);
return convertToReference(character, WebUtils.DEFAULT_CHARACTER_ENCODING);
}
/**

View File

@ -36,25 +36,25 @@ import org.springframework.util.SystemPropertyUtils;
*/
public abstract class ServletContextPropertyUtils {
private static final PropertyPlaceholderHelper strictHelper =
new PropertyPlaceholderHelper(SystemPropertyUtils.PLACEHOLDER_PREFIX,
private static final PropertyPlaceholderHelper strictHelper =
new PropertyPlaceholderHelper(SystemPropertyUtils.PLACEHOLDER_PREFIX,
SystemPropertyUtils.PLACEHOLDER_SUFFIX, SystemPropertyUtils.VALUE_SEPARATOR, false);
private static final PropertyPlaceholderHelper nonStrictHelper =
new PropertyPlaceholderHelper(SystemPropertyUtils.PLACEHOLDER_PREFIX,
private static final PropertyPlaceholderHelper nonStrictHelper =
new PropertyPlaceholderHelper(SystemPropertyUtils.PLACEHOLDER_PREFIX,
SystemPropertyUtils.PLACEHOLDER_SUFFIX, SystemPropertyUtils.VALUE_SEPARATOR, true);
/**
* Resolve ${...} placeholders in the given text, replacing them with corresponding
* servlet context init parameter or system property values.
* @param text the String to resolve
* @param servletContext the servletContext to use for lookups.
* @param text the String to resolve
* @param servletContext the servletContext to use for lookups.
* @return the resolved String
* @throws IllegalArgumentException if there is an unresolvable placeholder
* @see SystemPropertyUtils#PLACEHOLDER_PREFIX
* @see SystemPropertyUtils#PLACEHOLDER_SUFFIX
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)
*/
public static String resolvePlaceholders(String text, ServletContext servletContext) {
return resolvePlaceholders(text, servletContext, false);
@ -65,13 +65,13 @@ public abstract class ServletContextPropertyUtils {
* servlet context init parameter or system property values. Unresolvable placeholders
* with no default value are ignored and passed through unchanged if the flag is set to true.
* @param text the String to resolve
* @param servletContext the servletContext to use for lookups.
* @param servletContext the servletContext to use for lookups.
* @param ignoreUnresolvablePlaceholders flag to determine is unresolved placeholders are ignored
* @return the resolved String
* @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is false
* @see SystemPropertyUtils#PLACEHOLDER_PREFIX
* @see SystemPropertyUtils#PLACEHOLDER_SUFFIX
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)
*/
public static String resolvePlaceholders(String text, ServletContext servletContext,
boolean ignoreUnresolvablePlaceholders) {
@ -84,20 +84,20 @@ public abstract class ServletContextPropertyUtils {
private static class ServletContextPlaceholderResolver
implements PropertyPlaceholderHelper.PlaceholderResolver {
private final String text;
private final String text;
private final ServletContext servletContext;
private final ServletContext servletContext;
public ServletContextPlaceholderResolver(String text, ServletContext servletContext) {
this.text = text;
this.servletContext = servletContext;
}
public ServletContextPlaceholderResolver(String text, ServletContext servletContext) {
this.text = text;
this.servletContext = servletContext;
}
@Override
@Nullable
public String resolvePlaceholder(String placeholderName) {
try {
String propVal = this.servletContext.getInitParameter(placeholderName);
try {
String propVal = this.servletContext.getInitParameter(placeholderName);
if (propVal == null) {
// Fall back to system properties.
propVal = System.getProperty(placeholderName);
@ -108,12 +108,12 @@ public abstract class ServletContextPropertyUtils {
}
return propVal;
}
catch (Throwable ex) {
System.err.println("Could not resolve placeholder '" + placeholderName + "' in [" +
this.text + "] as ServletContext init-parameter or system property: " + ex);
return null;
}
}
}
catch (Throwable ex) {
System.err.println("Could not resolve placeholder '" + placeholderName + "' in [" +
this.text + "] as ServletContext init-parameter or system property: " + ex);
return null;
}
}
}
}

View File

@ -102,20 +102,20 @@ public class UriTemplate implements Serializable {
return encodedComponents.toUri();
}
/**
* Given an array of variables, expand this template into a full URI. The array represent variable values.
* The order of variables is significant.
* <p>Example:
* <pre class="code">
* UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
* System.out.println(template.expand("Rest & Relax", 42));
* </pre>
* will print: <blockquote>{@code http://example.com/hotels/Rest%20%26%20Relax/bookings/42}</blockquote>
* @param uriVariableValues the array of URI variables
* @return the expanded URI
* @throws IllegalArgumentException if {@code uriVariables} is {@code null}
* or if it does not contain sufficient variables
*/
/**
* Given an array of variables, expand this template into a full URI. The array represent variable values.
* The order of variables is significant.
* <p>Example:
* <pre class="code">
* UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
* System.out.println(template.expand("Rest & Relax", 42));
* </pre>
* will print: <blockquote>{@code http://example.com/hotels/Rest%20%26%20Relax/bookings/42}</blockquote>
* @param uriVariableValues the array of URI variables
* @return the expanded URI
* @throws IllegalArgumentException if {@code uriVariables} is {@code null}
* or if it does not contain sufficient variables
*/
public URI expand(Object... uriVariableValues) {
UriComponents expandedComponents = this.uriComponents.expand(uriVariableValues);
UriComponents encodedComponents = expandedComponents.encode();

View File

@ -107,8 +107,8 @@ class CaptureVariablePathElement extends PathElement {
match = (pathIndex == matchingContext.pathLength);
if (!match && matchingContext.isMatchOptionalTrailingSeparator()) {
match = //(nextPos > candidateIndex) &&
(pathIndex + 1) == matchingContext.pathLength &&
matchingContext.isSeparator(pathIndex);
(pathIndex + 1) == matchingContext.pathLength &&
matchingContext.isSeparator(pathIndex);
}
}
}

View File

@ -75,7 +75,7 @@ class RegexPathElement extends PathElement {
patternBuilder.append(".*");
int pos = matcher.start();
if (pos < 1 || text.charAt(pos-1) != '.') {
// To be compatible with the AntPathMatcher comparator,
// To be compatible with the AntPathMatcher comparator,
// '.*' is not considered a wildcard usage
this.wildcardCount++;
}
@ -129,13 +129,13 @@ class RegexPathElement extends PathElement {
@Override
public boolean matches(int pathIndex, MatchingContext matchingContext) {
String textToMatch = matchingContext.pathElementValue(pathIndex);
String textToMatch = matchingContext.pathElementValue(pathIndex);
Matcher matcher = this.pattern.matcher(textToMatch);
boolean matches = matcher.matches();
if (matches) {
if (isNoMorePattern()) {
if (matchingContext.determineRemainingPath &&
if (matchingContext.determineRemainingPath &&
(this.variableNames.isEmpty() ? true : textToMatch.length() > 0)) {
matchingContext.remainingPathIndex = pathIndex + 1;
matches = true;
@ -143,12 +143,13 @@ class RegexPathElement extends PathElement {
else {
// No more pattern, is there more data?
// If pattern is capturing variables there must be some actual data to bind to them
matches = (pathIndex + 1) >= matchingContext.pathLength &&
(this.variableNames.isEmpty() || textToMatch.length() > 0);
matches = (pathIndex + 1) >= matchingContext.pathLength
&& (this.variableNames.isEmpty() || textToMatch.length() > 0);
if (!matches && matchingContext.isMatchOptionalTrailingSeparator()) {
matches = (this.variableNames.isEmpty() || textToMatch.length() > 0) &&
(pathIndex + 2) >= matchingContext.pathLength &&
matchingContext.isSeparator(pathIndex + 1);
matches = (this.variableNames.isEmpty()
|| textToMatch.length() > 0)
&& (pathIndex + 2) >= matchingContext.pathLength
&& matchingContext.isSeparator(pathIndex + 1);
}
}
}
@ -176,7 +177,7 @@ class RegexPathElement extends PathElement {
}
return matches;
}
@Override
public int getNormalizedLength() {
int varsLength = 0;

View File

@ -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.
@ -65,7 +65,7 @@ class SeparatorPathElement extends PathElement {
public String toString() {
return "Separator(" + this.separator + ")";
}
public char[] getChars() {
return new char[] {this.separator};
}

View File

@ -73,7 +73,7 @@ class SingleCharWildcardedPathElement extends PathElement {
// Not enough data to match this path element
return false;
}
char[] data = ((PathSegment)element).valueToMatchAsChars();
if (this.caseSensitive) {
for (int i = 0; i < this.len; i++) {
@ -92,7 +92,7 @@ class SingleCharWildcardedPathElement extends PathElement {
}
}
}
pathIndex++;
if (isNoMorePattern()) {
if (matchingContext.determineRemainingPath) {
@ -129,7 +129,7 @@ class SingleCharWildcardedPathElement extends PathElement {
public String toString() {
return "SingleCharWildcarded(" + String.valueOf(this.text) + ")";
}
@Override
public char[] getChars() {
return this.text;

View File

@ -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.
@ -22,7 +22,7 @@ import org.springframework.web.util.pattern.PathPattern.MatchingContext;
/**
* A wildcard path element. In the pattern '/foo/&ast;/goo' the * is
* represented by a WildcardPathElement. Within a path it matches at least
* represented by a WildcardPathElement. Within a path it matches at least
* one character but at the end of a path it can match zero characters.
*
* @author Andy Clement
@ -36,7 +36,7 @@ class WildcardPathElement extends PathElement {
/**
* Matching on a WildcardPathElement is quite straight forward. Scan the
* Matching on a WildcardPathElement is quite straight forward. Scan the
* candidate from the candidateIndex onwards for the next separator or the end of the
* candidate.
*/
@ -53,7 +53,7 @@ class WildcardPathElement extends PathElement {
segmentData = ((PathContainer.PathSegment)element).valueToMatch();
pathIndex++;
}
if (isNoMorePattern()) {
if (matchingContext.determineRemainingPath) {
matchingContext.remainingPathIndex = pathIndex;
@ -72,7 +72,7 @@ class WildcardPathElement extends PathElement {
}
}
}
else {
else {
// Within a path (e.g. /aa/*/bb) there must be at least one character to match the wildcard
if (segmentData == null || segmentData.length() == 0) {
return false;

View File

@ -64,8 +64,8 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport
public AbstractHandlerMapping() {
this.patternParser = new PathPatternParser();
this.globalCorsConfigSource = new UrlBasedCorsConfigurationSource(this.patternParser);
this.patternParser = new PathPatternParser();
this.globalCorsConfigSource = new UrlBasedCorsConfigurationSource(this.patternParser);
}

View File

@ -42,7 +42,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
/**
* Jetty {@link WebSocket @WebSocket} handler that delegates events to a
* reactive {@link WebSocketHandler} and its session.
*
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -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.
@ -38,7 +38,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
/**
* Spring {@link WebSocketSession} implementation that adapts to a Jetty
* WebSocket {@link org.eclipse.jetty.websocket.api.Session}.
*
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -37,7 +37,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
/**
* Adapter for Java WebSocket API (JSR-356) that delegates events to a reactive
* {@link WebSocketHandler} and its session.
*
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -38,7 +38,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
/**
* Spring {@link WebSocketSession} adapter for a standard Java (JSR 356)
* {@link javax.websocket.Session}.
*
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -29,7 +29,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
/**
* Spring {@link WebSocketSession} adapter for Tomcat's
* {@link javax.websocket.Session}.
*
*
* @author Violeta Georgieva
* @since 5.0
*/

View File

@ -36,7 +36,7 @@ import org.springframework.web.reactive.socket.WebSocketMessage.Type;
/**
* Undertow {@link WebSocketConnectionCallback} implementation that adapts and
* delegates to a Spring {@link WebSocketHandler}.
*
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -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.
@ -40,7 +40,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
/**
* Spring {@link WebSocketSession} implementation that adapts to an Undertow
* {@link io.undertow.websockets.core.WebSocketChannel}.
*
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -28,7 +28,7 @@ import reactor.core.publisher.MonoProcessor;
/**
* {@link WebSocketClient} implementation for use with the Java WebSocket API.
*
*
* @author Violeta Georgieva
* @since 5.0
*/

View File

@ -92,7 +92,7 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W
* @since 5.0.8
*/
public UndertowWebSocketClient(XnioWorker worker, ByteBufferPool byteBufferPool,
Consumer<ConnectionBuilder> builderConsumer) {
Consumer<ConnectionBuilder> builderConsumer) {
Assert.notNull(worker, "XnioWorker must not be null");
Assert.notNull(byteBufferPool, "ByteBufferPool must not be null");

View File

@ -45,7 +45,7 @@ import org.springframework.web.server.ServerWebExchange;
/**
* A {@link RequestUpgradeStrategy} for use with Jetty.
*
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -44,7 +44,7 @@ import org.springframework.web.server.ServerWebExchange;
/**
* A {@link RequestUpgradeStrategy} for use with Undertow.
*
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -214,7 +214,7 @@ class ResourcesBeanDefinitionParser implements BeanDefinitionParser {
else {
cacheControl = CacheControl.empty();
}
if ("true".equals(element.getAttribute("must-revalidate"))) {
cacheControl = cacheControl.mustRevalidate();
}

Some files were not shown because too many files have changed in this diff Show More