From 0ac827e73a7588deee79e28c6c517eaadcb3086e Mon Sep 17 00:00:00 2001 From: Gunnar Hillert Date: Mon, 25 Mar 2013 18:05:51 -0400 Subject: [PATCH] AMQP-302 - Remove Warnings During Build with JDK7 * Add JavaDoc links to build.gradle * Make deprecation message in *FederatedExchange* more expressive (Add affected version) AMQP-302 - Code Review Changes --- build.gradle | 9 ++++++++- .../org/springframework/amqp/core/FederatedExchange.java | 5 +++-- .../amqp/support/converter/SimpleMessageConverter.java | 3 ++- .../erlang/connection/SingleConnectionFactory.java | 2 +- .../amqp/rabbit/config/FederatedExchangeParser.java | 5 ++--- .../amqp/rabbit/connection/CachingConnectionFactory.java | 6 +++--- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 67c4a21c..33a00b76 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,12 @@ allprojects { } ext { - expandPlaceholders='**/quick-tour.xml' + expandPlaceholders = '**/quick-tour.xml' + javadocLinks = [ + "http://docs.oracle.com/javase/6/docs/api", + "http://docs.oracle.com/javaee/6/api", + "http://static.springsource.org/spring/docs/3.1.x/javadoc-api" + ] as String[] } subprojects { subproject -> @@ -218,6 +223,8 @@ task api(type: Javadoc) { options.author = true options.header = rootProject.description options.overview = 'src/api/overview.html' + options.links(rootProject.ext.javadocLinks) + source subprojects.collect { project -> project.sourceSets.main.allJava } diff --git a/spring-amqp/src/main/java/org/springframework/amqp/core/FederatedExchange.java b/spring-amqp/src/main/java/org/springframework/amqp/core/FederatedExchange.java index 8fb547b1..88a60d80 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/core/FederatedExchange.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/core/FederatedExchange.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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,7 +21,8 @@ import java.util.Map; /** * * @see AmqpAdmin - * @deprecated RabbitMQ no longer supports 'x-federation' exchanges. + * @deprecated Starting with version 3.0 RabbitMQ no longer supports + * 'x-federation' exchanges. * * @author Gary Russell */ diff --git a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SimpleMessageConverter.java b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SimpleMessageConverter.java index d4183e05..8876c896 100644 --- a/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SimpleMessageConverter.java +++ b/spring-amqp/src/main/java/org/springframework/amqp/support/converter/SimpleMessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import org.springframework.amqp.core.MessageProperties; import org.springframework.amqp.utils.SerializationUtils; import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.remoting.rmi.CodebaseAwareObjectInputStream; +import java.rmi.server.RMIClassLoader; import org.springframework.util.ClassUtils; /** diff --git a/spring-erlang/src/main/java/org/springframework/erlang/connection/SingleConnectionFactory.java b/spring-erlang/src/main/java/org/springframework/erlang/connection/SingleConnectionFactory.java index f61bfd02..535edc3d 100644 --- a/spring-erlang/src/main/java/org/springframework/erlang/connection/SingleConnectionFactory.java +++ b/spring-erlang/src/main/java/org/springframework/erlang/connection/SingleConnectionFactory.java @@ -229,7 +229,7 @@ public class SingleConnectionFactory implements ConnectionFactory, classes.add(Connection.class); return (Connection) Proxy.newProxyInstance( Connection.class.getClassLoader(), - classes.toArray(new Class[classes.size()]), + classes.toArray(new Class[classes.size()]), new SharedConnectionInvocationHandler(target)); } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FederatedExchangeParser.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FederatedExchangeParser.java index d3f160f8..a4cdc06c 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FederatedExchangeParser.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/config/FederatedExchangeParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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 @@ -14,7 +14,6 @@ package org.springframework.amqp.rabbit.config; import org.springframework.amqp.core.ExchangeTypes; -import org.springframework.amqp.core.FederatedExchange; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.ParserContext; @@ -43,7 +42,7 @@ public class FederatedExchangeParser extends AbstractExchangeParser { @Override protected Class getBeanClass(Element element) { - return FederatedExchange.class; + return org.springframework.amqp.core.FederatedExchange.class; } diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactory.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactory.java index 0760fabc..c0eca635 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactory.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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 @@ -190,10 +190,10 @@ public class CachingConnectionFactory extends AbstractConnectionFactory { getChannelListener().onCreate(targetChannel, transactional); Class[] interfaces; if (this.publisherConfirms || this.publisherReturns) { - interfaces = new Class[] { ChannelProxy.class, PublisherCallbackChannel.class }; + interfaces = new Class[] { ChannelProxy.class, PublisherCallbackChannel.class }; } else { - interfaces = new Class[] { ChannelProxy.class }; + interfaces = new Class[] { ChannelProxy.class }; } return (ChannelProxy) Proxy.newProxyInstance(ChannelProxy.class.getClassLoader(), interfaces, new CachedChannelInvocationHandler(targetChannel, channelList,