Polish JSON warnings / javadoc
Issue gh-3736
This commit is contained in:
@@ -30,7 +30,7 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Jackson deserializer for {@link Cookie}. This is needed because in most cases we don't
|
||||
* set {@link Cookie#domain} property. So when jackson deserialize that json {@link Cookie#setDomain(String)}
|
||||
* set {@link Cookie#getDomain()} property. So when jackson deserialize that json {@link Cookie#setDomain(String)}
|
||||
* throws {@link NullPointerException}. This is registered with {@link CookieMixin} but you can also use it with
|
||||
* your own mixin.
|
||||
*
|
||||
|
||||
+3
-3
@@ -43,9 +43,9 @@ class DefaultCsrfTokenMixin {
|
||||
* JsonCreator constructor needed by Jackson to create {@link org.springframework.security.web.csrf.DefaultCsrfToken}
|
||||
* object.
|
||||
*
|
||||
* @param headerName
|
||||
* @param parameterName
|
||||
* @param token
|
||||
* @param headerName the name of the header
|
||||
* @param parameterName the parameter name
|
||||
* @param token the CSRF token value
|
||||
*/
|
||||
@JsonCreator
|
||||
public DefaultCsrfTokenMixin(@JsonProperty("headerName") String headerName,
|
||||
|
||||
@@ -75,6 +75,7 @@ public class SavedCookieMixinTests extends AbstractMixinTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void deserializeSavedCookieWithList() throws IOException, JSONException {
|
||||
String expectedJson = String.format("[\"java.util.ArrayList\", [%s]]", expectedSavedCookieJson);
|
||||
List<SavedCookie> savedCookies = (List<SavedCookie>)buildObjectMapper().readValue(expectedJson, Object.class);
|
||||
|
||||
Reference in New Issue
Block a user