package-info for repackaged libraries (and other polishing)

This commit is contained in:
Juergen Hoeller 2017-04-06 14:10:46 +02:00
parent 75dd8d9c06
commit 67ea4b3a05
14 changed files with 45 additions and 40 deletions

View File

@ -0,0 +1,4 @@
/**
* The core AOP Alliance advice marker.
*/
package org.aopalliance.aop;

View File

@ -0,0 +1,4 @@
/**
* The AOP Alliance reflective interception abstraction.
*/
package org.aopalliance.intercept;

View File

@ -0,0 +1,4 @@
/**
* Spring's variant of the AOP Alliance interfaces.
*/
package org.aopalliance;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 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.
@ -39,10 +39,11 @@ public class CacheNamespaceHandler extends NamespaceHandlerSupport {
static final String DEFAULT_CACHE_MANAGER_BEAN_NAME = "cacheManager";
static String extractCacheManager(Element element) {
return (element.hasAttribute(CacheNamespaceHandler.CACHE_MANAGER_ATTRIBUTE) ? element
.getAttribute(CacheNamespaceHandler.CACHE_MANAGER_ATTRIBUTE)
: CacheNamespaceHandler.DEFAULT_CACHE_MANAGER_BEAN_NAME);
return (element.hasAttribute(CacheNamespaceHandler.CACHE_MANAGER_ATTRIBUTE) ?
element.getAttribute(CacheNamespaceHandler.CACHE_MANAGER_ATTRIBUTE) :
CacheNamespaceHandler.DEFAULT_CACHE_MANAGER_BEAN_NAME);
}
static BeanDefinition parseKeyGenerator(Element element, BeanDefinition def) {
@ -53,9 +54,11 @@ public class CacheNamespaceHandler extends NamespaceHandlerSupport {
return def;
}
@Override
public void init() {
registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenCacheBeanDefinitionParser());
registerBeanDefinitionParser("advice", new CacheAdviceParser());
}
}

View File

@ -390,7 +390,7 @@ public @interface Configuration {
/**
* Explicitly specify the name of the Spring bean definition associated
* with this Configuration class. If left unspecified (the common case),
* with this Configuration class. If left unspecified (the common case),
* a bean name will be automatically generated.
* <p>The custom name applies only if the Configuration class is picked up via
* component scanning or supplied directly to a {@link AnnotationConfigApplicationContext}.

View File

@ -355,6 +355,7 @@ public class LocalValidatorFactoryBean extends SpringValidatorAdapter
@Override
public ParameterNameProvider getParameterNameProvider() {
Assert.notNull(this.validatorFactory, "No target ValidatorFactory set");
return this.validatorFactory.getParameterNameProvider();
}

View File

@ -1,6 +1,6 @@
/**
* Spring's repackaging of
* <a href="http://asm.ow2.org">org.objectweb.asm 5.0</a>
* <a href="http://asm.ow2.org">ASM</a>
* (for internal use only).
*
* <p>This repackaging technique avoids any potential conflicts with
@ -8,8 +8,6 @@
* libraries and frameworks.
*
* <p>As this repackaging happens at the class file level, sources
* and javadocs are not available here. See the original ObjectWeb
* <a href="http://asm.ow2.org/asm50/javadoc/user">ASM 5.0 javadocs</a>
* for details when working with these classes.
* and javadocs are not available here.
*/
package org.springframework.asm;

View File

@ -1,6 +1,6 @@
/**
* Spring's repackaging of
* <a href="http://cglib.sourceforge.net">net.sf.cglib 3.2</a>
* <a href="http://cglib.sourceforge.net">CGLIB</a>
* (for internal use only).
*
* <p>This repackaging technique avoids any potential conflicts with
@ -8,8 +8,6 @@
* libraries and frameworks.
*
* <p>As this repackaging happens at the class file level, sources
* and javadocs are not available here. See the original
* <a href="http://cglib.sourceforge.net/apidocs">CGLIB 3.2 javadocs</a>
* for details when working with these classes.
* and javadocs are not available here.
*/
package org.springframework.cglib;

View File

@ -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.
@ -239,18 +239,21 @@ public class ObjectUtilsTests {
}
@Test
@Deprecated
public void hashCodeWithBooleanFalse() {
int expected = Boolean.FALSE.hashCode();
assertEquals(expected, ObjectUtils.hashCode(false));
}
@Test
@Deprecated
public void hashCodeWithBooleanTrue() {
int expected = Boolean.TRUE.hashCode();
assertEquals(expected, ObjectUtils.hashCode(true));
}
@Test
@Deprecated
public void hashCodeWithDouble() {
double dbl = 9830.43;
int expected = (new Double(dbl)).hashCode();
@ -258,6 +261,7 @@ public class ObjectUtilsTests {
}
@Test
@Deprecated
public void hashCodeWithFloat() {
float flt = 34.8f;
int expected = (new Float(flt)).hashCode();
@ -265,6 +269,7 @@ public class ObjectUtilsTests {
}
@Test
@Deprecated
public void hashCodeWithLong() {
long lng = 883l;
int expected = (new Long(lng)).hashCode();

View File

@ -199,7 +199,7 @@ public abstract class ScriptUtils {
}
if (!inSingleQuote && !inDoubleQuote) {
if (script.startsWith(separator, i)) {
// we've reached the end of the current statement
// We've reached the end of the current statement
if (sb.length() > 0) {
statements.add(sb.toString());
sb = new StringBuilder();
@ -208,32 +208,31 @@ public abstract class ScriptUtils {
continue;
}
else if (script.startsWith(commentPrefix, i)) {
// skip over any content from the start of the comment to the EOL
// Skip over any content from the start of the comment to the EOL
int indexOfNextNewline = script.indexOf("\n", i);
if (indexOfNextNewline > i) {
i = indexOfNextNewline;
continue;
}
else {
// if there's no EOL, we must be at the end
// of the script, so stop here.
// If there's no EOL, we must be at the end of the script, so stop here.
break;
}
}
else if (script.startsWith(blockCommentStartDelimiter, i)) {
// skip over any block comments
// Skip over any block comments
int indexOfCommentEnd = script.indexOf(blockCommentEndDelimiter, i);
if (indexOfCommentEnd > i) {
i = indexOfCommentEnd + blockCommentEndDelimiter.length() - 1;
continue;
}
else {
throw new ScriptParseException(String.format("Missing block comment end delimiter [%s].",
blockCommentEndDelimiter), resource);
throw new ScriptParseException(
"Missing block comment end delimiter: " + blockCommentEndDelimiter, resource);
}
}
else if (c == ' ' || c == '\n' || c == '\t') {
// avoid multiple adjacent whitespace characters
// Avoid multiple adjacent whitespace characters
if (sb.length() > 0 && sb.charAt(sb.length() - 1) != ' ') {
c = ' ';
}

View File

@ -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.
@ -396,12 +396,7 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue
* or a newly built {@link HttpEntity} wrapper for that part
*/
protected HttpEntity<?> getHttpEntity(Object part) {
if (part instanceof HttpEntity) {
return (HttpEntity<?>) part;
}
else {
return new HttpEntity<>(part);
}
return (part instanceof HttpEntity ? (HttpEntity<?>) part : new HttpEntity<>(part));
}
/**
@ -416,7 +411,7 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue
if (part instanceof Resource) {
Resource resource = (Resource) part;
String filename = resource.getFilename();
if (this.multipartCharset != null) {
if (filename != null && this.multipartCharset != null) {
filename = MimeDelegate.encode(filename, this.multipartCharset.name());
}
return filename;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 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.
@ -47,9 +47,6 @@ public abstract class GsonBuilderUtils {
* {@link GsonBuilder#registerTypeHierarchyAdapter(Class, Object)} which
* serializes a {@code byte[]} property to and from a Base64-encoded String
* instead of a JSON array.
* <p><strong>NOTE:</strong> Use of this option requires the presence of the
* Apache Commons Codec library on the classpath when running on Java 6 or 7.
* On Java 8, the standard {@link java.util.Base64} facility is used instead.
*/
public static GsonBuilder gsonBuilderWithBase64EncodedByteArrays() {
GsonBuilder builder = new GsonBuilder();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@ -24,7 +24,6 @@ import com.google.gson.GsonBuilder;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
/**
* A {@link FactoryBean} for creating a Google Gson 2.x {@link Gson} instance.
*
@ -54,9 +53,6 @@ public class GsonFactoryBean implements FactoryBean<Gson>, InitializingBean {
* registered via {@link GsonBuilder#registerTypeHierarchyAdapter(Class, Object)}
* which serializes a {@code byte[]} property to and from a Base64-encoded String
* instead of a JSON array.
* <p><strong>NOTE:</strong> Use of this option requires the presence of the
* Apache Commons Codec library on the classpath when running on Java 6 or 7.
* On Java 8, the standard {@link java.util.Base64} facility is used instead.
* @see GsonBuilderUtils#gsonBuilderWithBase64EncodedByteArrays()
*/
public void setBase64EncodeByteArrays(boolean base64EncodeByteArrays) {

View File

@ -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.
@ -230,6 +230,7 @@ public class Jaxb2CollectionHttpMessageConverter<T extends Collection>
@Override
public void write(T t, Type type, MediaType contentType, HttpOutputMessage outputMessage)
throws IOException, HttpMessageNotWritableException {
throw new UnsupportedOperationException();
}