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

@@ -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();
}