Integrate animal sniffer
Animal sniffer provides tools to assist verifying that classes compiled with a newer JDK are compatible with an older JDK. This integratesthe latest version of the tool (1.11) that permits the use of custom annotations. Added @UsesJava7, @UsesJava8 and @UsesSunHttpServer and annotated the few places where we rely on a specific environment. The verification process can be invoked by running the 'sniff' task. Issue: SPR-11604 polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -22,6 +22,7 @@ import java.io.IOException;
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import com.sun.net.httpserver.HttpHandler;
|
||||
|
||||
import org.springframework.core.UsesSunHttpServer;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
/**
|
||||
@@ -48,6 +49,7 @@ import org.springframework.util.FileCopyUtils;
|
||||
* and is effectively retired (in contrast to its sibling Hessian)
|
||||
*/
|
||||
@Deprecated
|
||||
@UsesSunHttpServer
|
||||
public class SimpleBurlapServiceExporter extends BurlapExporter implements HttpHandler {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -22,6 +22,7 @@ import java.io.IOException;
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import com.sun.net.httpserver.HttpHandler;
|
||||
|
||||
import org.springframework.core.UsesSunHttpServer;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
/**
|
||||
@@ -44,6 +45,7 @@ import org.springframework.util.FileCopyUtils;
|
||||
* @see org.springframework.remoting.caucho.HessianProxyFactoryBean
|
||||
* @see org.springframework.remoting.httpinvoker.SimpleHttpInvokerServiceExporter
|
||||
*/
|
||||
@UsesSunHttpServer
|
||||
public class SimpleHessianServiceExporter extends HessianExporter implements HttpHandler {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -25,6 +25,7 @@ import java.io.OutputStream;
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import com.sun.net.httpserver.HttpHandler;
|
||||
|
||||
import org.springframework.core.UsesSunHttpServer;
|
||||
import org.springframework.remoting.rmi.RemoteInvocationSerializingExporter;
|
||||
import org.springframework.remoting.support.RemoteInvocation;
|
||||
import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
@@ -51,6 +52,7 @@ import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
* @see org.springframework.remoting.caucho.SimpleHessianServiceExporter
|
||||
* @see org.springframework.remoting.caucho.SimpleBurlapServiceExporter
|
||||
*/
|
||||
@UsesSunHttpServer
|
||||
public class SimpleHttpInvokerServiceExporter extends RemoteInvocationSerializingExporter
|
||||
implements HttpHandler {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -34,6 +34,7 @@ import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.ListableBeanFactory;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.core.UsesJava7;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -189,6 +190,7 @@ public abstract class AbstractJaxWsServiceExporter implements BeanFactoryAware,
|
||||
* @see Endpoint#create(Object)
|
||||
* @see Endpoint#create(String, Object)
|
||||
*/
|
||||
@UsesJava7 // Endpoint#create with WebServiceFeature[]
|
||||
protected Endpoint createEndpoint(Object bean) {
|
||||
if (this.endpointFeatures != null || this.webServiceFeatures != null) {
|
||||
WebServiceFeature[] endpointFeaturesToUse = this.endpointFeatures;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -24,6 +24,7 @@ import javax.xml.ws.Service;
|
||||
import javax.xml.ws.WebServiceFeature;
|
||||
import javax.xml.ws.handler.HandlerResolver;
|
||||
|
||||
import org.springframework.core.UsesJava7;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -146,6 +147,7 @@ public class LocalJaxWsServiceFactory {
|
||||
* @see #setServiceName
|
||||
* @see #setWsdlDocumentUrl
|
||||
*/
|
||||
@UsesJava7 // Service#create with WebServiceFeature[]
|
||||
public Service createJaxWsService() {
|
||||
Assert.notNull(this.serviceName, "No service name specified");
|
||||
Service service;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2014 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 com.sun.net.httpserver.HttpContext;
|
||||
import com.sun.net.httpserver.HttpServer;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.core.UsesSunHttpServer;
|
||||
|
||||
/**
|
||||
* Simple exporter for JAX-WS services, autodetecting annotated service beans
|
||||
@@ -46,6 +47,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
* @see javax.xml.ws.Endpoint#publish(Object)
|
||||
* @see SimpleJaxWsServiceExporter
|
||||
*/
|
||||
@UsesSunHttpServer
|
||||
public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceExporter {
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
Reference in New Issue
Block a user