diff --git a/build.gradle b/build.gradle index 86432bb6a9..624898b870 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlinVersion = '1.3.21' + ext.kotlinVersion = '1.3.30' repositories { maven { url 'https://repo.spring.io/plugins-release' } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 87b738cbd0..5c2d1cf016 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 44e7c4d1d7..ea13fdfd19 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index af6708ff22..b0d6d0ab5d 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m"' +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index 6d57edc706..9991c50326 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/CacheRequestHandlerAdvice.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/CacheRequestHandlerAdvice.java index 577f48352f..c23c25e559 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/CacheRequestHandlerAdvice.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/CacheRequestHandlerAdvice.java @@ -174,59 +174,59 @@ public class CacheRequestHandlerAdvice extends AbstractRequestHandlerAdvice @Override protected void onInit() { - List cacheOperations; + List cacheOperationsToUse; if (!ObjectUtils.isEmpty(this.cacheNames)) { - cacheOperations = this.cacheOperations.stream() - .filter((operation) -> ObjectUtils.isEmpty(operation.getCacheNames())) - .map((operation) -> { - CacheOperation.Builder builder; - if (operation instanceof CacheableOperation) { - CacheableOperation cacheableOperation = (CacheableOperation) operation; - CacheableOperation.Builder cacheableBuilder = new CacheableOperation.Builder(); - cacheableBuilder.setSync(cacheableOperation.isSync()); - String unless = cacheableOperation.getUnless(); - if (unless != null) { - cacheableBuilder.setUnless(unless); - } - builder = cacheableBuilder; - } - else if (operation instanceof CacheEvictOperation) { - CacheEvictOperation.Builder cacheEvictBuilder = new CacheEvictOperation.Builder(); - CacheEvictOperation cacheEvictOperation = (CacheEvictOperation) operation; - cacheEvictBuilder.setBeforeInvocation(cacheEvictOperation.isBeforeInvocation()); - cacheEvictBuilder.setCacheWide(cacheEvictOperation.isCacheWide()); - builder = cacheEvictBuilder; - } - else { - CachePutOperation cachePutOperation = (CachePutOperation) operation; - CachePutOperation.Builder cachePutBuilder = new CachePutOperation.Builder(); - String unless = cachePutOperation.getUnless(); - if (unless != null) { - cachePutBuilder.setUnless(unless); - } - builder = cachePutBuilder; - } - - builder.setName(operation.getName()); - builder.setCacheManager(operation.getCacheManager()); - builder.setCacheNames(this.cacheNames); - builder.setCacheResolver(operation.getCacheResolver()); - builder.setCondition(operation.getCondition()); - builder.setKey(operation.getKey()); - builder.setKeyGenerator(operation.getKeyGenerator()); - return builder.build(); - }) - .collect(Collectors.toList()); + cacheOperationsToUse = + this.cacheOperations.stream() + .filter((operation) -> ObjectUtils.isEmpty(operation.getCacheNames())) + .map((operation) -> { + CacheOperation.Builder builder; + if (operation instanceof CacheableOperation) { + CacheableOperation cacheableOperation = (CacheableOperation) operation; + CacheableOperation.Builder cacheableBuilder = new CacheableOperation.Builder(); + cacheableBuilder.setSync(cacheableOperation.isSync()); + String unless = cacheableOperation.getUnless(); + if (unless != null) { + cacheableBuilder.setUnless(unless); + } + builder = cacheableBuilder; + } + else if (operation instanceof CacheEvictOperation) { + CacheEvictOperation.Builder cacheEvictBuilder = new CacheEvictOperation.Builder(); + CacheEvictOperation cacheEvictOperation = (CacheEvictOperation) operation; + cacheEvictBuilder.setBeforeInvocation(cacheEvictOperation.isBeforeInvocation()); + cacheEvictBuilder.setCacheWide(cacheEvictOperation.isCacheWide()); + builder = cacheEvictBuilder; + } + else { + CachePutOperation cachePutOperation = (CachePutOperation) operation; + CachePutOperation.Builder cachePutBuilder = new CachePutOperation.Builder(); + String unless = cachePutOperation.getUnless(); + if (unless != null) { + cachePutBuilder.setUnless(unless); + } + builder = cachePutBuilder; + } + builder.setName(operation.getName()); + builder.setCacheManager(operation.getCacheManager()); + builder.setCacheNames(this.cacheNames); + builder.setCacheResolver(operation.getCacheResolver()); + builder.setCondition(operation.getCondition()); + builder.setKey(operation.getKey()); + builder.setKeyGenerator(operation.getKeyGenerator()); + return builder.build(); + }) + .collect(Collectors.toList()); } else { - cacheOperations = this.cacheOperations; + cacheOperationsToUse = this.cacheOperations; } this.delegate.setBeanFactory(getBeanFactory()); EvaluationContext evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory()); this.delegate.setKeyGenerator((target, method, params) -> this.keyExpression.getValue(evaluationContext, params[0])); // NOSONAR - this.delegate.setCacheOperationSources((method, targetClass) -> cacheOperations); + this.delegate.setCacheOperationSources((method, targetClass) -> cacheOperationsToUse); this.delegate.afterPropertiesSet(); }