Polishing
This commit is contained in:
@@ -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.
|
||||
@@ -775,7 +775,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
* by the {@code Date} header.
|
||||
* <p>The date is returned as the number of milliseconds since
|
||||
* January 1, 1970 GMT. Returns -1 when the date is unknown.
|
||||
* @throws IllegalArgumentException if the value can't be converted to a date
|
||||
* @throws IllegalArgumentException if the value cannot be converted to a date
|
||||
*/
|
||||
public long getDate() {
|
||||
return getFirstDate(DATE);
|
||||
|
||||
@@ -70,18 +70,18 @@ public class GsonHttpMessageConverter extends AbstractGenericHttpMessageConverte
|
||||
*/
|
||||
public GsonHttpMessageConverter() {
|
||||
super(MediaType.APPLICATION_JSON, new MediaType("application", "*+json"));
|
||||
this.setDefaultCharset(DEFAULT_CHARSET);
|
||||
setDefaultCharset(DEFAULT_CHARSET);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the {@code Gson} instance to use.
|
||||
* If not set, a default {@link Gson#Gson() Gson} instance is used.
|
||||
* If not set, a default {@link Gson#Gson() Gson} instance will be used.
|
||||
* <p>Setting a custom-configured {@code Gson} is one way to take further
|
||||
* control of the JSON serialization process.
|
||||
*/
|
||||
public void setGson(Gson gson) {
|
||||
Assert.notNull(gson, "'gson' is required");
|
||||
Assert.notNull(gson, "A Gson instance is required");
|
||||
this.gson = gson;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user