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:
committed by
Juergen Hoeller
parent
be85bd8e09
commit
5cedd0d5d4
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 {
|
public interface ConstructorInvocation extends Invocation {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the constructor being called.
|
* Get the constructor being called.
|
||||||
* <p>This method is a friendly implementation of the
|
* <p>This method is a friendly implementation of the
|
||||||
* {@link Joinpoint#getStaticPart()} method (same result).
|
* {@link Joinpoint#getStaticPart()} method (same result).
|
||||||
* @return the constructor being called
|
* @return the constructor being called
|
||||||
*/
|
*/
|
||||||
Constructor<?> getConstructor();
|
Constructor<?> getConstructor();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public abstract class AspectJProxyUtils {
|
|||||||
return (advisor instanceof InstantiationModelAwarePointcutAdvisor ||
|
return (advisor instanceof InstantiationModelAwarePointcutAdvisor ||
|
||||||
advisor.getAdvice() instanceof AbstractAspectJAdvice ||
|
advisor.getAdvice() instanceof AbstractAspectJAdvice ||
|
||||||
(advisor instanceof PointcutAdvisor &&
|
(advisor instanceof PointcutAdvisor &&
|
||||||
((PointcutAdvisor) advisor).getPointcut() instanceof AspectJExpressionPointcut));
|
((PointcutAdvisor) advisor).getPointcut() instanceof AspectJExpressionPointcut));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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) {
|
public AdvisorComponentDefinition(String advisorBeanName, BeanDefinition advisorDefinition) {
|
||||||
this(advisorBeanName, advisorDefinition, null);
|
this(advisorBeanName, advisorDefinition, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AdvisorComponentDefinition(
|
public AdvisorComponentDefinition(
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil
|
|||||||
for (Class<?> ifc : this.interfaces) {
|
for (Class<?> ifc : this.interfaces) {
|
||||||
if (this.advice instanceof DynamicIntroductionAdvice &&
|
if (this.advice instanceof DynamicIntroductionAdvice &&
|
||||||
!((DynamicIntroductionAdvice) this.advice).implementsInterface(ifc)) {
|
!((DynamicIntroductionAdvice) this.advice).implementsInterface(ifc)) {
|
||||||
throw new IllegalArgumentException("DynamicIntroductionAdvice [" + this.advice + "] " +
|
throw new IllegalArgumentException("DynamicIntroductionAdvice [" + this.advice + "] " +
|
||||||
"does not implement interface [" + ifc.getName() + "] specified for introduction");
|
"does not implement interface [" + ifc.getName() + "] specified for introduction");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ public class TypeMismatchException extends PropertyAccessException {
|
|||||||
"Failed to convert property value of type '" +
|
"Failed to convert property value of type '" +
|
||||||
ClassUtils.getDescriptiveType(propertyChangeEvent.getNewValue()) + "'" +
|
ClassUtils.getDescriptiveType(propertyChangeEvent.getNewValue()) + "'" +
|
||||||
(requiredType != null ?
|
(requiredType != null ?
|
||||||
" to required type '" + ClassUtils.getQualifiedName(requiredType) + "'" : "") +
|
" to required type '" + ClassUtils.getQualifiedName(requiredType) + "'" : "") +
|
||||||
(propertyChangeEvent.getPropertyName() != null ?
|
(propertyChangeEvent.getPropertyName() != null ?
|
||||||
" for property '" + propertyChangeEvent.getPropertyName() + "'" : ""),
|
" for property '" + propertyChangeEvent.getPropertyName() + "'" : ""),
|
||||||
cause);
|
cause);
|
||||||
this.propertyName = propertyChangeEvent.getPropertyName();
|
this.propertyName = propertyChangeEvent.getPropertyName();
|
||||||
this.value = propertyChangeEvent.getNewValue();
|
this.value = propertyChangeEvent.getNewValue();
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
@Override
|
||||||
public final AnnotationMetadata getMetadata() {
|
public final AnnotationMetadata getMetadata() {
|
||||||
return this.metadata;
|
return this.metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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) {
|
public static void sortConstructors(Constructor<?>[] constructors) {
|
||||||
Arrays.sort(constructors, (c1, c2) -> {
|
Arrays.sort(constructors, (c1, c2) -> {
|
||||||
boolean p1 = Modifier.isPublic(c1.getModifiers());
|
boolean p1 = Modifier.isPublic(c1.getModifiers());
|
||||||
boolean p2 = Modifier.isPublic(c2.getModifiers());
|
boolean p2 = Modifier.isPublic(c2.getModifiers());
|
||||||
if (p1 != p2) {
|
if (p1 != p2) {
|
||||||
return (p1 ? -1 : 1);
|
return (p1 ? -1 : 1);
|
||||||
}
|
}
|
||||||
int c1pl = c1.getParameterCount();
|
int c1pl = c1.getParameterCount();
|
||||||
int c2pl = c2.getParameterCount();
|
int c2pl = c2.getParameterCount();
|
||||||
return (c1pl < c2pl ? 1 : (c1pl > c2pl ? -1 : 0));
|
return (c1pl < c2pl ? 1 : (c1pl > c2pl ? -1 : 0));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,15 +78,15 @@ abstract class AutowireUtils {
|
|||||||
*/
|
*/
|
||||||
public static void sortFactoryMethods(Method[] factoryMethods) {
|
public static void sortFactoryMethods(Method[] factoryMethods) {
|
||||||
Arrays.sort(factoryMethods, (fm1, fm2) -> {
|
Arrays.sort(factoryMethods, (fm1, fm2) -> {
|
||||||
boolean p1 = Modifier.isPublic(fm1.getModifiers());
|
boolean p1 = Modifier.isPublic(fm1.getModifiers());
|
||||||
boolean p2 = Modifier.isPublic(fm2.getModifiers());
|
boolean p2 = Modifier.isPublic(fm2.getModifiers());
|
||||||
if (p1 != p2) {
|
if (p1 != p2) {
|
||||||
return (p1 ? -1 : 1);
|
return (p1 ? -1 : 1);
|
||||||
}
|
}
|
||||||
int c1pl = fm1.getParameterCount();
|
int c1pl = fm1.getParameterCount();
|
||||||
int c2pl = fm2.getParameterCount();
|
int c2pl = fm2.getParameterCount();
|
||||||
return (c1pl < c2pl ? 1 : (c1pl > c2pl ? -1 : 0));
|
return (c1pl < c2pl ? 1 : (c1pl > c2pl ? -1 : 0));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean
|
|||||||
public void setBeanFactory(BeanFactory beanFactory) {
|
public void setBeanFactory(BeanFactory beanFactory) {
|
||||||
if (!(beanFactory instanceof ConfigurableListableBeanFactory)) {
|
if (!(beanFactory instanceof ConfigurableListableBeanFactory)) {
|
||||||
throw new IllegalArgumentException(
|
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;
|
this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
|
||||||
if (this.beanWiringInfoResolver == null) {
|
if (this.beanWiringInfoResolver == null) {
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
|
|||||||
private DataSource nonTransactionalDataSource;
|
private DataSource nonTransactionalDataSource;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private Map<String, ?> schedulerContextMap;
|
private Map<String, ?> schedulerContextMap;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private ApplicationContext applicationContext;
|
private ApplicationContext applicationContext;
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 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;
|
this.metaClass = metaClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaClass getMetaClass() {
|
public MetaClass getMetaClass() {
|
||||||
return this.metaClass;
|
return this.metaClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ public class GenericGroovyApplicationContext extends GenericApplicationContext i
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Object getProperty(String property) {
|
public Object getProperty(String property) {
|
||||||
if (containsBean(property)) {
|
if (containsBean(property)) {
|
||||||
return getBean(property);
|
return getBean(property);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public final class CharSequenceEncoder extends AbstractEncoder<CharSequence> {
|
|||||||
charset = mimeType.getCharset();
|
charset = mimeType.getCharset();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
charset = DEFAULT_CHARSET;
|
charset = DEFAULT_CHARSET;
|
||||||
}
|
}
|
||||||
return charset;
|
return charset;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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() +
|
logger.debug("Could not read super class [" + metadata.getSuperClassName() +
|
||||||
"] of type-filtered class [" + metadata.getClassName() + "]");
|
"] of type-filtered class [" + metadata.getClassName() + "]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class ExponentialBackOff implements BackOff {
|
|||||||
return maxInterval;
|
return maxInterval;
|
||||||
}
|
}
|
||||||
else if (this.currentInterval < 0) {
|
else if (this.currentInterval < 0) {
|
||||||
long initialInterval = getInitialInterval();
|
long initialInterval = getInitialInterval();
|
||||||
this.currentInterval = (initialInterval < maxInterval
|
this.currentInterval = (initialInterval < maxInterval
|
||||||
? initialInterval : maxInterval);
|
? initialInterval : maxInterval);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -95,9 +95,9 @@ public class OpDivide extends Operator {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.children.length > 1) {
|
if (this.children.length > 1) {
|
||||||
if (!getRightOperand().isCompilable()) {
|
if (!getRightOperand().isCompilable()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (this.exitTypeDescriptor != null);
|
return (this.exitTypeDescriptor != null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -93,9 +93,9 @@ public class OpModulus extends Operator {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.children.length > 1) {
|
if (this.children.length > 1) {
|
||||||
if (!getRightOperand().isCompilable()) {
|
if (!getRightOperand().isCompilable()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (this.exitTypeDescriptor != null);
|
return (this.exitTypeDescriptor != 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -126,9 +126,9 @@ public class OpMultiply extends Operator {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.children.length > 1) {
|
if (this.children.length > 1) {
|
||||||
if (!getRightOperand().isCompilable()) {
|
if (!getRightOperand().isCompilable()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (this.exitTypeDescriptor != null);
|
return (this.exitTypeDescriptor != 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -178,9 +178,9 @@ public class OpPlus extends Operator {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.children.length > 1) {
|
if (this.children.length > 1) {
|
||||||
if (!getRightOperand().isCompilable()) {
|
if (!getRightOperand().isCompilable()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (this.exitTypeDescriptor != null);
|
return (this.exitTypeDescriptor != 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -385,10 +385,10 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
|
|||||||
@Nullable
|
@Nullable
|
||||||
protected Method findGetterForProperty(String propertyName, Class<?> clazz, boolean mustBeStatic) {
|
protected Method findGetterForProperty(String propertyName, Class<?> clazz, boolean mustBeStatic) {
|
||||||
Method method = findMethodForProperty(getPropertyMethodSuffixes(propertyName),
|
Method method = findMethodForProperty(getPropertyMethodSuffixes(propertyName),
|
||||||
"get", clazz, mustBeStatic, 0, ANY_TYPES);
|
"get", clazz, mustBeStatic, 0, ANY_TYPES);
|
||||||
if (method == null) {
|
if (method == null) {
|
||||||
method = findMethodForProperty(getPropertyMethodSuffixes(propertyName),
|
method = findMethodForProperty(getPropertyMethodSuffixes(propertyName),
|
||||||
"is", clazz, mustBeStatic, 0, BOOLEAN_TYPES);
|
"is", clazz, mustBeStatic, 0, BOOLEAN_TYPES);
|
||||||
}
|
}
|
||||||
return method;
|
return method;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ public class StandardEvaluationContext implements EvaluationContext {
|
|||||||
@Override
|
@Override
|
||||||
public TypeConverter getTypeConverter() {
|
public TypeConverter getTypeConverter() {
|
||||||
if (this.typeConverter == null) {
|
if (this.typeConverter == null) {
|
||||||
this.typeConverter = new StandardTypeConverter();
|
this.typeConverter = new StandardTypeConverter();
|
||||||
}
|
}
|
||||||
return this.typeConverter;
|
return this.typeConverter;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,17 +129,17 @@ public interface Log {
|
|||||||
void fatal(Object message, Throwable t);
|
void fatal(Object message, Throwable t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with error log level.
|
* Logs a message with error log level.
|
||||||
* @param message log this message
|
* @param message log this message
|
||||||
*/
|
*/
|
||||||
void error(Object message);
|
void error(Object message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs an error with error log level.
|
* Logs an error with error log level.
|
||||||
* @param message log this message
|
* @param message log this message
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
*/
|
*/
|
||||||
void error(Object message, Throwable t);
|
void error(Object message, Throwable t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with warn log level.
|
* Logs a message with warn log level.
|
||||||
@@ -154,18 +154,18 @@ public interface Log {
|
|||||||
*/
|
*/
|
||||||
void warn(Object message, Throwable t);
|
void warn(Object message, Throwable t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with info log level.
|
* Logs a message with info log level.
|
||||||
* @param message log this message
|
* @param message log this message
|
||||||
*/
|
*/
|
||||||
void info(Object message);
|
void info(Object message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs an error with info log level.
|
* Logs an error with info log level.
|
||||||
* @param message log this message
|
* @param message log this message
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
*/
|
*/
|
||||||
void info(Object message, Throwable t);
|
void info(Object message, Throwable t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with debug log level.
|
* Logs a message with debug log level.
|
||||||
@@ -181,16 +181,16 @@ public interface Log {
|
|||||||
void debug(Object message, Throwable t);
|
void debug(Object message, Throwable t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message with trace log level.
|
* Logs a message with trace log level.
|
||||||
* @param message log this message
|
* @param message log this message
|
||||||
*/
|
*/
|
||||||
void trace(Object message);
|
void trace(Object message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs an error with trace log level.
|
* Logs an error with trace log level.
|
||||||
* @param message log this message
|
* @param message log this message
|
||||||
* @param t log this cause
|
* @param t log this cause
|
||||||
*/
|
*/
|
||||||
void trace(Object message, Throwable t);
|
void trace(Object message, Throwable t);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,20 +90,20 @@ public interface TableMetaDataProvider {
|
|||||||
/**
|
/**
|
||||||
* Are we using the meta-data for the table columns?
|
* 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:
|
* Does this database support the JDBC 3.0 feature of retrieving generated keys:
|
||||||
* {@link java.sql.DatabaseMetaData#supportsGetGeneratedKeys()}?
|
* {@link java.sql.DatabaseMetaData#supportsGetGeneratedKeys()}?
|
||||||
*/
|
*/
|
||||||
boolean isGetGeneratedKeysSupported();
|
boolean isGetGeneratedKeysSupported();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does this database support a simple query to retrieve the generated key when
|
* 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?
|
* the JDBC 3.0 feature of retrieving generated keys is not supported?
|
||||||
* @see #isGetGeneratedKeysSupported()
|
* @see #isGetGeneratedKeysSupported()
|
||||||
*/
|
*/
|
||||||
boolean isGetGeneratedKeysSimulated();
|
boolean isGetGeneratedKeysSimulated();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the simple query to retrieve a generated key.
|
* 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:
|
* Does this database support a column name String array for retrieving generated keys:
|
||||||
* {@link java.sql.Connection#createStruct(String, Object[])}?
|
* {@link java.sql.Connection#createStruct(String, Object[])}?
|
||||||
*/
|
*/
|
||||||
boolean isGeneratedKeysColumnNameArraySupported();
|
boolean isGeneratedKeysColumnNameArraySupported();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the table parameter meta-data that is currently used.
|
* Get the table parameter meta-data that is currently used.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -50,7 +50,7 @@ public class NamedParameterJdbcDaoSupport extends JdbcDaoSupport {
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public NamedParameterJdbcTemplate getNamedParameterJdbcTemplate() {
|
public NamedParameterJdbcTemplate getNamedParameterJdbcTemplate() {
|
||||||
return this.namedParameterJdbcTemplate;
|
return this.namedParameterJdbcTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public abstract class JdbcDaoSupport extends DaoSupport {
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public final JdbcTemplate getJdbcTemplate() {
|
public final JdbcTemplate getJdbcTemplate() {
|
||||||
return this.jdbcTemplate;
|
return this.jdbcTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ public abstract class SqlQuery<T> extends SqlOperation {
|
|||||||
String sqlToUse = NamedParameterUtils.substituteNamedParameters(parsedSql, paramSource);
|
String sqlToUse = NamedParameterUtils.substituteNamedParameters(parsedSql, paramSource);
|
||||||
Object[] params = NamedParameterUtils.buildValueArray(parsedSql, paramSource, getDeclaredParameters());
|
Object[] params = NamedParameterUtils.buildValueArray(parsedSql, paramSource, getDeclaredParameters());
|
||||||
RowMapper<T> rowMapper = newRowMapper(params, context);
|
RowMapper<T> rowMapper = newRowMapper(params, context);
|
||||||
return getJdbcTemplate().query(newPreparedStatementCreator(sqlToUse, params), rowMapper);
|
return getJdbcTemplate().query(newPreparedStatementCreator(sqlToUse, params), rowMapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public @interface SendToUser {
|
|||||||
* or only to the session of the input message being handled.
|
* 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
|
* <p>By default, this is set to {@code true} in which case messages are
|
||||||
* broadcast to all sessions.
|
* broadcast to all sessions.
|
||||||
*/
|
*/
|
||||||
boolean broadcast() default true;
|
boolean broadcast() default true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -467,8 +467,8 @@ public class MessageHeaderAccessor {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Object getReplyChannel() {
|
public Object getReplyChannel() {
|
||||||
return getHeader(MessageHeaders.REPLY_CHANNEL);
|
return getHeader(MessageHeaders.REPLY_CHANNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setErrorChannelName(String errorChannelName) {
|
public void setErrorChannelName(String errorChannelName) {
|
||||||
setHeader(MessageHeaders.ERROR_CHANNEL, errorChannelName);
|
setHeader(MessageHeaders.ERROR_CHANNEL, errorChannelName);
|
||||||
@@ -480,8 +480,8 @@ public class MessageHeaderAccessor {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Object getErrorChannel() {
|
public Object getErrorChannel() {
|
||||||
return getHeader(MessageHeaders.ERROR_CHANNEL);
|
return getHeader(MessageHeaders.ERROR_CHANNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Log message stuff
|
// Log message stuff
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
@Nullable
|
||||||
public final HibernateTemplate getHibernateTemplate() {
|
public final HibernateTemplate getHibernateTemplate() {
|
||||||
return this.hibernateTemplate;
|
return this.hibernateTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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) {
|
public void setOrder(int order) {
|
||||||
this.order = order;
|
this.order = order;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getOrder() {
|
public int getOrder() {
|
||||||
return this.order;
|
return this.order;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -767,7 +767,7 @@ public class XStreamMarshaller extends AbstractMarshaller implements BeanClassLo
|
|||||||
else {
|
else {
|
||||||
throw new IllegalArgumentException("DOMSource contains neither Document nor Element");
|
throw new IllegalArgumentException("DOMSource contains neither Document nor Element");
|
||||||
}
|
}
|
||||||
return doUnmarshal(streamReader, null);
|
return doUnmarshal(streamReader, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -783,7 +783,7 @@ public class XStreamMarshaller extends AbstractMarshaller implements BeanClassLo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException {
|
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
|
@Override
|
||||||
@@ -800,12 +800,12 @@ public class XStreamMarshaller extends AbstractMarshaller implements BeanClassLo
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Object unmarshalInputStream(InputStream inputStream, @Nullable DataHolder dataHolder) throws XmlMappingException, IOException {
|
public Object unmarshalInputStream(InputStream inputStream, @Nullable DataHolder dataHolder) throws XmlMappingException, IOException {
|
||||||
if (this.streamDriver != null) {
|
if (this.streamDriver != null) {
|
||||||
return doUnmarshal(this.streamDriver.createReader(inputStream), dataHolder);
|
return doUnmarshal(this.streamDriver.createReader(inputStream), dataHolder);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return unmarshalReader(new InputStreamReader(inputStream, this.encoding), dataHolder);
|
return unmarshalReader(new InputStreamReader(inputStream, this.encoding), dataHolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class MockAsyncContext implements AsyncContext {
|
|||||||
@Override
|
@Override
|
||||||
public void dispatch() {
|
public void dispatch() {
|
||||||
dispatch(this.request.getRequestURI());
|
dispatch(this.request.getRequestURI());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispatch(String path) {
|
public void dispatch(String path) {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public interface MvcResult {
|
|||||||
* @return an exception, or {@code null} if none
|
* @return an exception, or {@code null} if none
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
Exception getResolvedException();
|
Exception getResolvedException();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the "output" flash attributes saved during request processing.
|
* Return the "output" flash attributes saved during request processing.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -269,11 +269,11 @@ public abstract class MockMvcRequestBuilders {
|
|||||||
mvcResult.getAsyncResult();
|
mvcResult.getAsyncResult();
|
||||||
|
|
||||||
return servletContext -> {
|
return servletContext -> {
|
||||||
MockHttpServletRequest request = mvcResult.getRequest();
|
MockHttpServletRequest request = mvcResult.getRequest();
|
||||||
request.setDispatcherType(DispatcherType.ASYNC);
|
request.setDispatcherType(DispatcherType.ASYNC);
|
||||||
request.setAsyncStarted(false);
|
request.setAsyncStarted(false);
|
||||||
return request;
|
return request;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,17 +81,17 @@ public class ModelResultMatchers {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert the given model attributes do not exist.
|
* Assert the given model attributes do not exist.
|
||||||
*/
|
*/
|
||||||
public ResultMatcher attributeDoesNotExist(final String... names) {
|
public ResultMatcher attributeDoesNotExist(final String... names) {
|
||||||
return result -> {
|
return result -> {
|
||||||
ModelAndView mav = getModelAndView(result);
|
ModelAndView mav = getModelAndView(result);
|
||||||
for (String name : names) {
|
for (String name : names) {
|
||||||
assertTrue("Model attribute '" + name + "' exists", mav.getModel().get(name) == null);
|
assertTrue("Model attribute '" + name + "' exists", mav.getModel().get(name) == null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert the given model attribute(s) have errors.
|
* Assert the given model attribute(s) have errors.
|
||||||
|
|||||||
@@ -445,31 +445,31 @@ public class StatusResultMatchers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert the response status code is {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE} (419).
|
* 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 matching the deprecation of {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ResultMatcher isInsufficientSpaceOnResource() {
|
public ResultMatcher isInsufficientSpaceOnResource() {
|
||||||
return matcher(HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE);
|
return matcher(HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert the response status code is {@code HttpStatus.METHOD_FAILURE} (420).
|
* Assert the response status code is {@code HttpStatus.METHOD_FAILURE} (420).
|
||||||
* @deprecated matching the deprecation of {@code HttpStatus.METHOD_FAILURE}
|
* @deprecated matching the deprecation of {@code HttpStatus.METHOD_FAILURE}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ResultMatcher isMethodFailure() {
|
public ResultMatcher isMethodFailure() {
|
||||||
return matcher(HttpStatus.METHOD_FAILURE);
|
return matcher(HttpStatus.METHOD_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert the response status code is {@code HttpStatus.DESTINATION_LOCKED} (421).
|
* Assert the response status code is {@code HttpStatus.DESTINATION_LOCKED} (421).
|
||||||
* @deprecated matching the deprecation of {@code HttpStatus.DESTINATION_LOCKED}
|
* @deprecated matching the deprecation of {@code HttpStatus.DESTINATION_LOCKED}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ResultMatcher isDestinationLocked() {
|
public ResultMatcher isDestinationLocked() {
|
||||||
return matcher(HttpStatus.DESTINATION_LOCKED);
|
return matcher(HttpStatus.DESTINATION_LOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert the response status code is {@code HttpStatus.UNPROCESSABLE_ENTITY} (422).
|
* Assert the response status code is {@code HttpStatus.UNPROCESSABLE_ENTITY} (422).
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public abstract class CciDaoSupport extends DaoSupport {
|
|||||||
*/
|
*/
|
||||||
public final void setConnectionFactory(ConnectionFactory connectionFactory) {
|
public final void setConnectionFactory(ConnectionFactory connectionFactory) {
|
||||||
if (this.cciTemplate == null || connectionFactory != this.cciTemplate.getConnectionFactory()) {
|
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
|
@Nullable
|
||||||
public final CciTemplate getCciTemplate() {
|
public final CciTemplate getCciTemplate() {
|
||||||
return this.cciTemplate;
|
return this.cciTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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() {
|
private HttpAsyncClient startAsyncClient() {
|
||||||
HttpAsyncClient client = getAsyncClient();
|
HttpAsyncClient client = getAsyncClient();
|
||||||
if (client instanceof CloseableHttpAsyncClient) {
|
if (client instanceof CloseableHttpAsyncClient) {
|
||||||
CloseableHttpAsyncClient closeableAsyncClient = (CloseableHttpAsyncClient) client;
|
CloseableHttpAsyncClient closeableAsyncClient = (CloseableHttpAsyncClient) client;
|
||||||
if (!closeableAsyncClient.isRunning()) {
|
if (!closeableAsyncClient.isRunning()) {
|
||||||
@@ -175,10 +175,10 @@ public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsC
|
|||||||
|
|
||||||
HttpUriRequest httpRequest = createHttpUriRequest(httpMethod, uri);
|
HttpUriRequest httpRequest = createHttpUriRequest(httpMethod, uri);
|
||||||
postProcessHttpRequest(httpRequest);
|
postProcessHttpRequest(httpRequest);
|
||||||
HttpContext context = createHttpContext(httpMethod, uri);
|
HttpContext context = createHttpContext(httpMethod, uri);
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
context = HttpClientContext.create();
|
context = HttpClientContext.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request configuration not set in the context
|
// Request configuration not set in the context
|
||||||
if (context.getAttribute(HttpClientContext.REQUEST_CONFIG) == null) {
|
if (context.getAttribute(HttpClientContext.REQUEST_CONFIG) == 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -82,21 +82,21 @@ final class HttpComponentsClientHttpResponse extends AbstractClientHttpResponse
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
// Release underlying connection back to the connection manager
|
// Release underlying connection back to the connection manager
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
// Attempt to keep connection alive by consuming its remaining content
|
// Attempt to keep connection alive by consuming its remaining content
|
||||||
EntityUtils.consume(this.httpResponse.getEntity());
|
EntityUtils.consume(this.httpResponse.getEntity());
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (this.httpResponse instanceof Closeable) {
|
if (this.httpResponse instanceof Closeable) {
|
||||||
((Closeable) this.httpResponse).close();
|
((Closeable) this.httpResponse).close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException ex) {
|
catch (IOException ex) {
|
||||||
// Ignore exception on close...
|
// Ignore exception on close...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -35,63 +35,63 @@ import org.springframework.lang.Nullable;
|
|||||||
public final class ServerSentEvent<T> {
|
public final class ServerSentEvent<T> {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private final String id;
|
private final String id;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private final String event;
|
private final String event;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private final Duration retry;
|
private final Duration retry;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private final String comment;
|
private final String comment;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private final T data;
|
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) {
|
@Nullable String comment, @Nullable T data) {
|
||||||
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.event = event;
|
this.event = event;
|
||||||
this.retry = retry;
|
this.retry = retry;
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the {@code id} field of this event, if available.
|
* 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.
|
|
||||||
*/
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public String event() {
|
public String id() {
|
||||||
return this.event;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the {@code retry} field of this event, if available.
|
* Return the {@code event} field of this event, if available.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public Duration retry() {
|
public String event() {
|
||||||
return this.retry;
|
return this.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the comment of this event, if available.
|
* Return the {@code retry} field of this event, if available.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String comment() {
|
public Duration retry() {
|
||||||
return this.comment;
|
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.
|
* Return the {@code data} field of this event, if available.
|
||||||
@@ -102,11 +102,11 @@ public final class ServerSentEvent<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return ("ServerSentEvent [id = '" + this.id + "\', event='" + this.event + "\', retry=" +
|
return ("ServerSentEvent [id = '" + this.id + "\', event='" + this.event + "\', retry=" +
|
||||||
this.retry + ", comment='" + this.comment + "', data=" + this.data + ']');
|
this.retry + ", comment='" + this.comment + "', data=" + this.data + ']');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,41 +128,41 @@ public final class ServerSentEvent<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A mutable builder for a {@code SseEvent}.
|
* A mutable builder for a {@code SseEvent}.
|
||||||
*
|
*
|
||||||
* @param <T> the type of data that this event contains
|
* @param <T> the type of data that this event contains
|
||||||
*/
|
*/
|
||||||
public interface Builder<T> {
|
public interface Builder<T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of the {@code id} field.
|
* Set the value of the {@code id} field.
|
||||||
* @param id the value of the id field
|
* @param id the value of the id field
|
||||||
* @return {@code this} builder
|
* @return {@code this} builder
|
||||||
*/
|
*/
|
||||||
Builder<T> id(String id);
|
Builder<T> id(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of the {@code event} field.
|
* Set the value of the {@code event} field.
|
||||||
* @param event the value of the event field
|
* @param event the value of the event field
|
||||||
* @return {@code this} builder
|
* @return {@code this} builder
|
||||||
*/
|
*/
|
||||||
Builder<T> event(String event);
|
Builder<T> event(String event);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of the {@code retry} field.
|
* Set the value of the {@code retry} field.
|
||||||
* @param retry the value of the retry field
|
* @param retry the value of the retry field
|
||||||
* @return {@code this} builder
|
* @return {@code this} builder
|
||||||
*/
|
*/
|
||||||
Builder<T> retry(Duration retry);
|
Builder<T> retry(Duration retry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set SSE comment. If a multi-line comment is provided, it will be turned into multiple
|
* 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.
|
* SSE comment lines as defined in Server-Sent Events W3C recommendation.
|
||||||
* @param comment the comment to set
|
* @param comment the comment to set
|
||||||
* @return {@code this} builder
|
* @return {@code this} builder
|
||||||
*/
|
*/
|
||||||
Builder<T> comment(String comment);
|
Builder<T> comment(String comment);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of the {@code data} field. If the {@code data} argument is a multi-line
|
* 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);
|
Builder<T> data(@Nullable T data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the event.
|
* Builds the event.
|
||||||
* @return the built event
|
* @return the built event
|
||||||
*/
|
*/
|
||||||
ServerSentEvent<T> build();
|
ServerSentEvent<T> build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class BuilderImpl<T> implements Builder<T> {
|
private static class BuilderImpl<T> implements Builder<T> {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private String event;
|
private String event;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private Duration retry;
|
private Duration retry;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private String comment;
|
private String comment;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private T data;
|
private T data;
|
||||||
|
|
||||||
public BuilderImpl() {
|
public BuilderImpl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BuilderImpl(T data) {
|
public BuilderImpl(T data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder<T> id(String id) {
|
public Builder<T> id(String id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder<T> event(String event) {
|
public Builder<T> event(String event) {
|
||||||
this.event = event;
|
this.event = event;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder<T> retry(Duration retry) {
|
public Builder<T> retry(Duration retry) {
|
||||||
this.retry = retry;
|
this.retry = retry;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder<T> comment(String comment) {
|
public Builder<T> comment(String comment) {
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder<T> data(@Nullable T data) {
|
public Builder<T> data(@Nullable T data) {
|
||||||
@@ -236,10 +236,10 @@ public final class ServerSentEvent<T> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ServerSentEvent<T> build() {
|
public ServerSentEvent<T> build() {
|
||||||
return new ServerSentEvent<>(this.id, this.event, this.retry, this.comment, this.data);
|
return new ServerSentEvent<>(this.id, this.event, this.retry, this.comment, this.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,6 @@ public interface ExtensionRegistryInitializer {
|
|||||||
* Initializes the {@code ExtensionRegistry} with Protocol Message extensions.
|
* Initializes the {@code ExtensionRegistry} with Protocol Message extensions.
|
||||||
* @param registry the registry to populate
|
* @param registry the registry to populate
|
||||||
*/
|
*/
|
||||||
void initializeExtensionRegistry(ExtensionRegistry registry);
|
void initializeExtensionRegistry(ExtensionRegistry registry);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,10 +108,10 @@ class ServletServerHttpRequest extends AbstractServerHttpRequest {
|
|||||||
private static HttpHeaders initHeaders(HttpServletRequest request) {
|
private static HttpHeaders initHeaders(HttpServletRequest request) {
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
for (Enumeration<?> names = request.getHeaderNames();
|
for (Enumeration<?> names = request.getHeaderNames();
|
||||||
names.hasMoreElements(); ) {
|
names.hasMoreElements(); ) {
|
||||||
String name = (String) names.nextElement();
|
String name = (String) names.nextElement();
|
||||||
for (Enumeration<?> values = request.getHeaders(name);
|
for (Enumeration<?> values = request.getHeaders(name);
|
||||||
values.hasMoreElements(); ) {
|
values.hasMoreElements(); ) {
|
||||||
headers.add(name, (String) values.nextElement());
|
headers.add(name, (String) values.nextElement());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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);
|
response.setContentType(CONTENT_TYPE_HESSIAN);
|
||||||
try {
|
try {
|
||||||
invoke(request.getInputStream(), response.getOutputStream());
|
invoke(request.getInputStream(), response.getOutputStream());
|
||||||
}
|
}
|
||||||
catch (Throwable ex) {
|
catch (Throwable ex) {
|
||||||
throw new NestedServletException("Hessian skeleton invocation failed", ex);
|
throw new NestedServletException("Hessian skeleton invocation failed", 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class HtmlCharacterEntityReferences {
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String convertToReference(char character) {
|
public String convertToReference(char character) {
|
||||||
return convertToReference(character, WebUtils.DEFAULT_CHARACTER_ENCODING);
|
return convertToReference(character, WebUtils.DEFAULT_CHARACTER_ENCODING);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,25 +36,25 @@ import org.springframework.util.SystemPropertyUtils;
|
|||||||
*/
|
*/
|
||||||
public abstract class ServletContextPropertyUtils {
|
public abstract class ServletContextPropertyUtils {
|
||||||
|
|
||||||
private static final PropertyPlaceholderHelper strictHelper =
|
private static final PropertyPlaceholderHelper strictHelper =
|
||||||
new PropertyPlaceholderHelper(SystemPropertyUtils.PLACEHOLDER_PREFIX,
|
new PropertyPlaceholderHelper(SystemPropertyUtils.PLACEHOLDER_PREFIX,
|
||||||
SystemPropertyUtils.PLACEHOLDER_SUFFIX, SystemPropertyUtils.VALUE_SEPARATOR, false);
|
SystemPropertyUtils.PLACEHOLDER_SUFFIX, SystemPropertyUtils.VALUE_SEPARATOR, false);
|
||||||
|
|
||||||
private static final PropertyPlaceholderHelper nonStrictHelper =
|
private static final PropertyPlaceholderHelper nonStrictHelper =
|
||||||
new PropertyPlaceholderHelper(SystemPropertyUtils.PLACEHOLDER_PREFIX,
|
new PropertyPlaceholderHelper(SystemPropertyUtils.PLACEHOLDER_PREFIX,
|
||||||
SystemPropertyUtils.PLACEHOLDER_SUFFIX, SystemPropertyUtils.VALUE_SEPARATOR, true);
|
SystemPropertyUtils.PLACEHOLDER_SUFFIX, SystemPropertyUtils.VALUE_SEPARATOR, true);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve ${...} placeholders in the given text, replacing them with corresponding
|
* Resolve ${...} placeholders in the given text, replacing them with corresponding
|
||||||
* servlet context init parameter or system property values.
|
* servlet context init parameter or system property values.
|
||||||
* @param text the String to resolve
|
* @param text the String to resolve
|
||||||
* @param servletContext the servletContext to use for lookups.
|
* @param servletContext the servletContext to use for lookups.
|
||||||
* @return the resolved String
|
* @return the resolved String
|
||||||
* @throws IllegalArgumentException if there is an unresolvable placeholder
|
* @throws IllegalArgumentException if there is an unresolvable placeholder
|
||||||
* @see SystemPropertyUtils#PLACEHOLDER_PREFIX
|
* @see SystemPropertyUtils#PLACEHOLDER_PREFIX
|
||||||
* @see SystemPropertyUtils#PLACEHOLDER_SUFFIX
|
* @see SystemPropertyUtils#PLACEHOLDER_SUFFIX
|
||||||
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)
|
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)
|
||||||
*/
|
*/
|
||||||
public static String resolvePlaceholders(String text, ServletContext servletContext) {
|
public static String resolvePlaceholders(String text, ServletContext servletContext) {
|
||||||
return resolvePlaceholders(text, servletContext, false);
|
return resolvePlaceholders(text, servletContext, false);
|
||||||
@@ -65,13 +65,13 @@ public abstract class ServletContextPropertyUtils {
|
|||||||
* servlet context init parameter or system property values. Unresolvable placeholders
|
* 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.
|
* with no default value are ignored and passed through unchanged if the flag is set to true.
|
||||||
* @param text the String to resolve
|
* @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
|
* @param ignoreUnresolvablePlaceholders flag to determine is unresolved placeholders are ignored
|
||||||
* @return the resolved String
|
* @return the resolved String
|
||||||
* @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is false
|
* @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is false
|
||||||
* @see SystemPropertyUtils#PLACEHOLDER_PREFIX
|
* @see SystemPropertyUtils#PLACEHOLDER_PREFIX
|
||||||
* @see SystemPropertyUtils#PLACEHOLDER_SUFFIX
|
* @see SystemPropertyUtils#PLACEHOLDER_SUFFIX
|
||||||
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)
|
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)
|
||||||
*/
|
*/
|
||||||
public static String resolvePlaceholders(String text, ServletContext servletContext,
|
public static String resolvePlaceholders(String text, ServletContext servletContext,
|
||||||
boolean ignoreUnresolvablePlaceholders) {
|
boolean ignoreUnresolvablePlaceholders) {
|
||||||
@@ -84,20 +84,20 @@ public abstract class ServletContextPropertyUtils {
|
|||||||
private static class ServletContextPlaceholderResolver
|
private static class ServletContextPlaceholderResolver
|
||||||
implements PropertyPlaceholderHelper.PlaceholderResolver {
|
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) {
|
public ServletContextPlaceholderResolver(String text, ServletContext servletContext) {
|
||||||
this.text = text;
|
this.text = text;
|
||||||
this.servletContext = servletContext;
|
this.servletContext = servletContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public String resolvePlaceholder(String placeholderName) {
|
public String resolvePlaceholder(String placeholderName) {
|
||||||
try {
|
try {
|
||||||
String propVal = this.servletContext.getInitParameter(placeholderName);
|
String propVal = this.servletContext.getInitParameter(placeholderName);
|
||||||
if (propVal == null) {
|
if (propVal == null) {
|
||||||
// Fall back to system properties.
|
// Fall back to system properties.
|
||||||
propVal = System.getProperty(placeholderName);
|
propVal = System.getProperty(placeholderName);
|
||||||
@@ -108,12 +108,12 @@ public abstract class ServletContextPropertyUtils {
|
|||||||
}
|
}
|
||||||
return propVal;
|
return propVal;
|
||||||
}
|
}
|
||||||
catch (Throwable ex) {
|
catch (Throwable ex) {
|
||||||
System.err.println("Could not resolve placeholder '" + placeholderName + "' in [" +
|
System.err.println("Could not resolve placeholder '" + placeholderName + "' in [" +
|
||||||
this.text + "] as ServletContext init-parameter or system property: " + ex);
|
this.text + "] as ServletContext init-parameter or system property: " + ex);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,20 +102,20 @@ public class UriTemplate implements Serializable {
|
|||||||
return encodedComponents.toUri();
|
return encodedComponents.toUri();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given an array of variables, expand this template into a full URI. The array represent variable values.
|
* Given an array of variables, expand this template into a full URI. The array represent variable values.
|
||||||
* The order of variables is significant.
|
* The order of variables is significant.
|
||||||
* <p>Example:
|
* <p>Example:
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
|
* UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
|
||||||
* System.out.println(template.expand("Rest & Relax", 42));
|
* System.out.println(template.expand("Rest & Relax", 42));
|
||||||
* </pre>
|
* </pre>
|
||||||
* will print: <blockquote>{@code http://example.com/hotels/Rest%20%26%20Relax/bookings/42}</blockquote>
|
* will print: <blockquote>{@code http://example.com/hotels/Rest%20%26%20Relax/bookings/42}</blockquote>
|
||||||
* @param uriVariableValues the array of URI variables
|
* @param uriVariableValues the array of URI variables
|
||||||
* @return the expanded URI
|
* @return the expanded URI
|
||||||
* @throws IllegalArgumentException if {@code uriVariables} is {@code null}
|
* @throws IllegalArgumentException if {@code uriVariables} is {@code null}
|
||||||
* or if it does not contain sufficient variables
|
* or if it does not contain sufficient variables
|
||||||
*/
|
*/
|
||||||
public URI expand(Object... uriVariableValues) {
|
public URI expand(Object... uriVariableValues) {
|
||||||
UriComponents expandedComponents = this.uriComponents.expand(uriVariableValues);
|
UriComponents expandedComponents = this.uriComponents.expand(uriVariableValues);
|
||||||
UriComponents encodedComponents = expandedComponents.encode();
|
UriComponents encodedComponents = expandedComponents.encode();
|
||||||
|
|||||||
@@ -107,8 +107,8 @@ class CaptureVariablePathElement extends PathElement {
|
|||||||
match = (pathIndex == matchingContext.pathLength);
|
match = (pathIndex == matchingContext.pathLength);
|
||||||
if (!match && matchingContext.isMatchOptionalTrailingSeparator()) {
|
if (!match && matchingContext.isMatchOptionalTrailingSeparator()) {
|
||||||
match = //(nextPos > candidateIndex) &&
|
match = //(nextPos > candidateIndex) &&
|
||||||
(pathIndex + 1) == matchingContext.pathLength &&
|
(pathIndex + 1) == matchingContext.pathLength &&
|
||||||
matchingContext.isSeparator(pathIndex);
|
matchingContext.isSeparator(pathIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,12 +143,13 @@ class RegexPathElement extends PathElement {
|
|||||||
else {
|
else {
|
||||||
// No more pattern, is there more data?
|
// No more pattern, is there more data?
|
||||||
// If pattern is capturing variables there must be some actual data to bind to them
|
// If pattern is capturing variables there must be some actual data to bind to them
|
||||||
matches = (pathIndex + 1) >= matchingContext.pathLength &&
|
matches = (pathIndex + 1) >= matchingContext.pathLength
|
||||||
(this.variableNames.isEmpty() || textToMatch.length() > 0);
|
&& (this.variableNames.isEmpty() || textToMatch.length() > 0);
|
||||||
if (!matches && matchingContext.isMatchOptionalTrailingSeparator()) {
|
if (!matches && matchingContext.isMatchOptionalTrailingSeparator()) {
|
||||||
matches = (this.variableNames.isEmpty() || textToMatch.length() > 0) &&
|
matches = (this.variableNames.isEmpty()
|
||||||
(pathIndex + 2) >= matchingContext.pathLength &&
|
|| textToMatch.length() > 0)
|
||||||
matchingContext.isSeparator(pathIndex + 1);
|
&& (pathIndex + 2) >= matchingContext.pathLength
|
||||||
|
&& matchingContext.isSeparator(pathIndex + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport
|
|||||||
|
|
||||||
|
|
||||||
public AbstractHandlerMapping() {
|
public AbstractHandlerMapping() {
|
||||||
this.patternParser = new PathPatternParser();
|
this.patternParser = new PathPatternParser();
|
||||||
this.globalCorsConfigSource = new UrlBasedCorsConfigurationSource(this.patternParser);
|
this.globalCorsConfigSource = new UrlBasedCorsConfigurationSource(this.patternParser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class UndertowWebSocketClient extends WebSocketClientSupport implements W
|
|||||||
* @since 5.0.8
|
* @since 5.0.8
|
||||||
*/
|
*/
|
||||||
public UndertowWebSocketClient(XnioWorker worker, ByteBufferPool byteBufferPool,
|
public UndertowWebSocketClient(XnioWorker worker, ByteBufferPool byteBufferPool,
|
||||||
Consumer<ConnectionBuilder> builderConsumer) {
|
Consumer<ConnectionBuilder> builderConsumer) {
|
||||||
|
|
||||||
Assert.notNull(worker, "XnioWorker must not be null");
|
Assert.notNull(worker, "XnioWorker must not be null");
|
||||||
Assert.notNull(byteBufferPool, "ByteBufferPool must not be null");
|
Assert.notNull(byteBufferPool, "ByteBufferPool must not be null");
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class ViewMethodReturnValueHandler implements HandlerMethodReturnValueHan
|
|||||||
public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType,
|
public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType,
|
||||||
ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception {
|
ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception {
|
||||||
|
|
||||||
if (returnValue instanceof View){
|
if (returnValue instanceof View){
|
||||||
View view = (View) returnValue;
|
View view = (View) returnValue;
|
||||||
mavContainer.setView(view);
|
mavContainer.setView(view);
|
||||||
if (view instanceof SmartView && ((SmartView) view).isRedirectView()) {
|
if (view instanceof SmartView && ((SmartView) view).isRedirectView()) {
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
|
|||||||
protected ModelAndView handleMethodArgumentNotValidException(MethodArgumentNotValidException ex,
|
protected ModelAndView handleMethodArgumentNotValidException(MethodArgumentNotValidException ex,
|
||||||
HttpServletRequest request, HttpServletResponse response, @Nullable Object handler) throws IOException {
|
HttpServletRequest request, HttpServletResponse response, @Nullable Object handler) throws IOException {
|
||||||
|
|
||||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
||||||
return new ModelAndView();
|
return new ModelAndView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -131,14 +131,14 @@ public class BindTag extends HtmlEscapingAwareTag implements EditorAwareTag {
|
|||||||
* Default is to not ignore.
|
* Default is to not ignore.
|
||||||
*/
|
*/
|
||||||
public void setIgnoreNestedPath(boolean ignoreNestedPath) {
|
public void setIgnoreNestedPath(boolean ignoreNestedPath) {
|
||||||
this.ignoreNestedPath = ignoreNestedPath;
|
this.ignoreNestedPath = ignoreNestedPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return whether to ignore a nested path, if any.
|
* Return whether to ignore a nested path, if any.
|
||||||
*/
|
*/
|
||||||
public boolean isIgnoreNestedPath() {
|
public boolean isIgnoreNestedPath() {
|
||||||
return this.ignoreNestedPath;
|
return this.ignoreNestedPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
|
|||||||
targetUrl = replaceUriTemplateVariables(targetUrl.toString(), model, variables, enc);
|
targetUrl = replaceUriTemplateVariables(targetUrl.toString(), model, variables, enc);
|
||||||
}
|
}
|
||||||
if (isPropagateQueryProperties()) {
|
if (isPropagateQueryProperties()) {
|
||||||
appendCurrentQueryParams(targetUrl, request);
|
appendCurrentQueryParams(targetUrl, request);
|
||||||
}
|
}
|
||||||
if (this.exposeModelAttributes) {
|
if (this.exposeModelAttributes) {
|
||||||
appendQueryProperties(targetUrl, model, enc);
|
appendQueryProperties(targetUrl, model, enc);
|
||||||
|
|||||||
@@ -180,8 +180,8 @@ public class StandardWebSocketClient extends AbstractWebSocketClient {
|
|||||||
|
|
||||||
private int getPort(URI uri) {
|
private int getPort(URI uri) {
|
||||||
if (uri.getPort() == -1) {
|
if (uri.getPort() == -1) {
|
||||||
String scheme = uri.getScheme().toLowerCase(Locale.ENGLISH);
|
String scheme = uri.getScheme().toLowerCase(Locale.ENGLISH);
|
||||||
return ("wss".equals(scheme) ? 443 : 80);
|
return ("wss".equals(scheme) ? 443 : 80);
|
||||||
}
|
}
|
||||||
return uri.getPort();
|
return uri.getPort();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -422,17 +422,17 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
|
|||||||
Assert.state(getTaskScheduler() != null, "No TaskScheduler configured");
|
Assert.state(getTaskScheduler() != null, "No TaskScheduler configured");
|
||||||
this.lastWriteTime = System.currentTimeMillis();
|
this.lastWriteTime = System.currentTimeMillis();
|
||||||
this.inactivityTasks.add(getTaskScheduler().scheduleWithFixedDelay(() -> {
|
this.inactivityTasks.add(getTaskScheduler().scheduleWithFixedDelay(() -> {
|
||||||
if (System.currentTimeMillis() - this.lastWriteTime > duration) {
|
if (System.currentTimeMillis() - this.lastWriteTime > duration) {
|
||||||
try {
|
try {
|
||||||
runnable.run();
|
runnable.run();
|
||||||
}
|
}
|
||||||
catch (Throwable ex) {
|
catch (Throwable ex) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("WriteInactivityTask failure", ex);
|
logger.debug("WriteInactivityTask failure", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, duration / 2));
|
}, duration / 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -118,12 +118,12 @@ public class JettyRequestUpgradeStrategy implements RequestUpgradeStrategy, Serv
|
|||||||
this.factory = new WebSocketServerFactory(this.servletContext, this.policy);
|
this.factory = new WebSocketServerFactory(this.servletContext, this.policy);
|
||||||
}
|
}
|
||||||
this.factory.setCreator((request, response) -> {
|
this.factory.setCreator((request, response) -> {
|
||||||
WebSocketHandlerContainer container = containerHolder.get();
|
WebSocketHandlerContainer container = containerHolder.get();
|
||||||
Assert.state(container != null, "Expected WebSocketHandlerContainer");
|
Assert.state(container != null, "Expected WebSocketHandlerContainer");
|
||||||
response.setAcceptedSubProtocol(container.getSelectedProtocol());
|
response.setAcceptedSubProtocol(container.getSelectedProtocol());
|
||||||
response.setExtensions(container.getExtensionConfigs());
|
response.setExtensions(container.getExtensionConfigs());
|
||||||
return container.getHandler();
|
return container.getHandler();
|
||||||
});
|
});
|
||||||
this.factory.start();
|
this.factory.start();
|
||||||
}
|
}
|
||||||
catch (Throwable ex) {
|
catch (Throwable 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -37,9 +37,9 @@ public abstract class AbstractSockJsMessageCodec implements SockJsMessageCodec {
|
|||||||
char[] quotedChars = applyJsonQuoting(messages[i]);
|
char[] quotedChars = applyJsonQuoting(messages[i]);
|
||||||
sb.append(escapeSockJsSpecialChars(quotedChars));
|
sb.append(escapeSockJsSpecialChars(quotedChars));
|
||||||
sb.append('"');
|
sb.append('"');
|
||||||
if (i < messages.length - 1) {
|
if (i < messages.length - 1) {
|
||||||
sb.append(',');
|
sb.append(',');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sb.append(']');
|
sb.append(']');
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
@@ -576,21 +576,21 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig
|
|||||||
|
|
||||||
private static final String IFRAME_CONTENT =
|
private static final String IFRAME_CONTENT =
|
||||||
"<!DOCTYPE html>\n" +
|
"<!DOCTYPE html>\n" +
|
||||||
"<html>\n" +
|
"<html>\n" +
|
||||||
"<head>\n" +
|
"<head>\n" +
|
||||||
" <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n" +
|
" <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n" +
|
||||||
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" +
|
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" +
|
||||||
" <script>\n" +
|
" <script>\n" +
|
||||||
" document.domain = document.domain;\n" +
|
" document.domain = document.domain;\n" +
|
||||||
" _sockjs_onload = function(){SockJS.bootstrap_iframe();};\n" +
|
" _sockjs_onload = function(){SockJS.bootstrap_iframe();};\n" +
|
||||||
" </script>\n" +
|
" </script>\n" +
|
||||||
" <script src=\"%s\"></script>\n" +
|
" <script src=\"%s\"></script>\n" +
|
||||||
"</head>\n" +
|
"</head>\n" +
|
||||||
"<body>\n" +
|
"<body>\n" +
|
||||||
" <h2>Don't panic!</h2>\n" +
|
" <h2>Don't panic!</h2>\n" +
|
||||||
" <p>This is a SockJS hidden iframe. It's used for cross domain magic.</p>\n" +
|
" <p>This is a SockJS hidden iframe. It's used for cross domain magic.</p>\n" +
|
||||||
"</body>\n" +
|
"</body>\n" +
|
||||||
"</html>";
|
"</html>";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(ServerHttpRequest request, ServerHttpResponse response) throws IOException {
|
public void handle(ServerHttpRequest request, ServerHttpResponse response) throws IOException {
|
||||||
|
|||||||
Reference in New Issue
Block a user