Upgrade to the released Milestones
* SF-5.0 RC3 * AMQP2.0 M5 * Security 5.0 M3 * Spring Twitter 2.0 M4 * Gradle 4.0.1 * Checkstyle 8.0 * JsonPath 2.3 * Fix deprecations and Checkstyle violations
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,6 +46,8 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@@ -55,9 +57,9 @@ public class PublisherAnnotationAdvisor extends AbstractPointcutAdvisor implemen
|
||||
|
||||
private final MessagePublishingInterceptor interceptor;
|
||||
|
||||
@SuppressWarnings("unchecked") //For JDK7
|
||||
public PublisherAnnotationAdvisor(Class<? extends Annotation> ... publisherAnnotationTypes) {
|
||||
this.publisherAnnotationTypes = new HashSet<Class<? extends Annotation>>(Arrays.asList(publisherAnnotationTypes));
|
||||
@SuppressWarnings("unchecked")
|
||||
public PublisherAnnotationAdvisor(Class<? extends Annotation>... publisherAnnotationTypes) {
|
||||
this.publisherAnnotationTypes = new HashSet<>(Arrays.asList(publisherAnnotationTypes));
|
||||
PublisherMetadataSource metadataSource = new MethodAnnotationPublisherMetadataSource(this.publisherAnnotationTypes);
|
||||
this.interceptor = new MessagePublishingInterceptor(metadataSource);
|
||||
}
|
||||
@@ -69,6 +71,7 @@ public class PublisherAnnotationAdvisor extends AbstractPointcutAdvisor implemen
|
||||
|
||||
|
||||
/**
|
||||
* A channel bean name to be used as default for publishing.
|
||||
* @param defaultChannelName the default channel name.
|
||||
* @since 4.0.3
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2015 the original author or authors.
|
||||
* Copyright 2013-2017 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.
|
||||
@@ -29,6 +29,7 @@ import com.jayway.jsonpath.Predicate;
|
||||
* Note {@link #evaluate} is used as {@code #jsonPath()} SpEL function.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public final class JsonPathUtils {
|
||||
@@ -41,7 +42,7 @@ public final class JsonPathUtils {
|
||||
return JsonPath.read((File) json, jsonPath, predicates);
|
||||
}
|
||||
else if (json instanceof URL) {
|
||||
return JsonPath.read((URL) json, jsonPath, predicates);
|
||||
return JsonPath.read(((URL) json).openStream(), jsonPath, predicates);
|
||||
}
|
||||
else if (json instanceof InputStream) {
|
||||
return JsonPath.read((InputStream) json, jsonPath, predicates);
|
||||
|
||||
@@ -759,13 +759,13 @@ public class MessagingMethodInvokerHelper<T> extends AbstractExpressionEvaluator
|
||||
}
|
||||
}, method12 -> method12.getName().equals(methodName));
|
||||
}
|
||||
Method method = targetMethod.get();
|
||||
if (method != null) {
|
||||
method = org.springframework.util.ClassUtils.getMostSpecificMethod(method, targetObject.getClass());
|
||||
Method theMethod = targetMethod.get();
|
||||
if (theMethod != null) {
|
||||
theMethod = org.springframework.util.ClassUtils.getMostSpecificMethod(theMethod, targetObject.getClass());
|
||||
InvocableHandlerMethod invocableHandlerMethod =
|
||||
this.messageHandlerMethodFactory.createInvocableHandlerMethod(targetObject, method);
|
||||
this.messageHandlerMethodFactory.createInvocableHandlerMethod(targetObject, theMethod);
|
||||
HandlerMethod handlerMethod = new HandlerMethod(invocableHandlerMethod, this.canProcessMessageList);
|
||||
checkSpelInvokerRequired(targetClass.get(), method, handlerMethod);
|
||||
checkSpelInvokerRequired(targetClass.get(), theMethod, handlerMethod);
|
||||
Class<?> targetParameterType = handlerMethod.getTargetParameterType();
|
||||
if (handlerMethod.isMessageMethod()) {
|
||||
if (candidateMessageMethods.containsKey(targetParameterType)) {
|
||||
|
||||
Reference in New Issue
Block a user