1
0
mirror of synced 2026-08-04 09:17:02 +00:00

Polish JSON warnings / javadoc

Issue gh-3736
This commit is contained in:
Rob Winch
2016-09-01 14:50:42 -05:00
parent 6d2003722e
commit 6f2b24a62b
9 changed files with 20 additions and 23 deletions
@@ -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.
*
@@ -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);