master
Juergen Hoeller 7 years ago
parent 33cd160861
commit a19d4deb24
  1. 4
      spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java
  2. 6
      spring-beans/src/main/java/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.java
  3. 13
      spring-jms/src/main/java/org/springframework/jms/support/JmsHeaderMapper.java
  4. 9
      spring-jms/src/main/java/org/springframework/jms/support/SimpleJmsHeaderMapper.java

@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -45,6 +45,7 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
this.aspectClass = aspectClass;
}
/**
* Return the specified aspect class (never {@code null}).
*/
@ -52,7 +53,6 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
return this.aspectClass;
}
@Override
public final Object getAspectInstance() {
try {

@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -524,10 +524,10 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
Closure callable = (Closure) args[args.length - 1];
callable.setDelegate(this);
callable.setResolveStrategy(Closure.DELEGATE_FIRST);
callable.call(currentBeanDefinition);
callable.call(this.currentBeanDefinition);
}
GroovyBeanDefinitionWrapper beanDefinition = currentBeanDefinition;
GroovyBeanDefinitionWrapper beanDefinition = this.currentBeanDefinition;
this.currentBeanDefinition = null;
beanDefinition.getBeanDefinition().setAttribute(GroovyBeanDefinitionWrapper.class.getName(), beanDefinition);
getRegistry().registerBeanDefinition(beanName, beanDefinition.getBeanDefinition());

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,9 +21,9 @@ import javax.jms.Message;
import org.springframework.messaging.support.HeaderMapper;
/**
* Strategy interface for mapping messaging Message headers to an outbound
* JMS Message (e.g. to configure JMS properties) or extracting messaging
* header values from an inbound JMS Message.
* Strategy interface for mapping {@link org.springframework.messaging.Message}
* headers to an outbound JMS {@link javax.jms.Message} (e.g. to configure JMS
* properties) or extracting messaging header values from an inbound JMS Message.
*
* @author Mark Fisher
* @author Oleg Zhurakousky
@ -32,7 +32,10 @@ import org.springframework.messaging.support.HeaderMapper;
*/
public interface JmsHeaderMapper extends HeaderMapper<Message> {
static final String CONTENT_TYPE_PROPERTY = "content_type";
/**
* The JMS-compliant {@code content_type} property.
*/
String CONTENT_TYPE_PROPERTY = "content_type";
}

@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -205,7 +205,6 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
logger.info("Failed to read JMSTimestamp property - skipping", ex);
}
Enumeration<?> jmsPropertyNames = jmsMessage.getPropertyNames();
if (jmsPropertyNames != null) {
while (jmsPropertyNames.hasMoreElements()) {
@ -233,7 +232,8 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
/**
* Add the outbound prefix if necessary.
* <p>Convert {@link MessageHeaders#CONTENT_TYPE} to content_type for JMS compliance.
* <p>Convert {@link MessageHeaders#CONTENT_TYPE} to {@code content_type} for JMS compliance.
* @see #CONTENT_TYPE_PROPERTY
*/
protected String fromHeaderName(String headerName) {
if (MessageHeaders.CONTENT_TYPE.equals(headerName)) {
@ -244,7 +244,8 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
/**
* Add the inbound prefix if necessary.
* <p>Convert content_type to {@link MessageHeaders#CONTENT_TYPE}.
* <p>Convert the JMS-compliant {@code content_type} to {@link MessageHeaders#CONTENT_TYPE}.
* @see #CONTENT_TYPE_PROPERTY
*/
protected String toHeaderName(String propertyName) {
if (CONTENT_TYPE_PROPERTY.equals(propertyName)) {

Loading…
Cancel
Save