Polish JSON class scope
Use package scope when possible Issue gh-3736
This commit is contained in:
parent
03d8904a03
commit
6d2003722e
|
@ -43,7 +43,7 @@ import java.util.Map;
|
|||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY,
|
||||
getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AssertionImplMixin {
|
||||
class AssertionImplMixin {
|
||||
|
||||
/**
|
||||
* Mixin Constructor helps in deserialize {@link org.jasig.cas.client.validation.AssertionImpl}
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.Map;
|
|||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AttributePrincipalImplMixin {
|
||||
class AttributePrincipalImplMixin {
|
||||
|
||||
/**
|
||||
* Mixin Constructor helps in deserialize {@link org.jasig.cas.client.authentication.AttributePrincipalImpl}
|
||||
|
|
|
@ -49,7 +49,7 @@ import java.util.Collection;
|
|||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, isGetterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
getterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.ANY)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CasAuthenticationTokenMixin {
|
||||
class CasAuthenticationTokenMixin {
|
||||
|
||||
/**
|
||||
* Mixin Constructor helps in deserialize {@link CasAuthenticationToken}
|
||||
|
|
|
@ -42,7 +42,7 @@ import java.util.Collection;
|
|||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, isGetterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
getterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.ANY)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AnonymousAuthenticationTokenMixin {
|
||||
class AnonymousAuthenticationTokenMixin {
|
||||
|
||||
/**
|
||||
* Constructor used by Jackson to create object of {@link org.springframework.security.authentication.AnonymousAuthenticationToken}.
|
||||
|
|
|
@ -48,7 +48,7 @@ import java.util.Collection;
|
|||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.ANY)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class RememberMeAuthenticationTokenMixin {
|
||||
class RememberMeAuthenticationTokenMixin {
|
||||
|
||||
/**
|
||||
* Constructor used by Jackson to create
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.util.Set;
|
|||
* @since 4.2
|
||||
*/
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
|
||||
public class UnmodifiableSetMixin {
|
||||
class UnmodifiableSetMixin {
|
||||
|
||||
/**
|
||||
* Mixin Constructor
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.util.Set;
|
|||
* @see UserMixin
|
||||
* @since 4.2
|
||||
*/
|
||||
public class UserDeserializer extends JsonDeserializer<User> {
|
||||
class UserDeserializer extends JsonDeserializer<User> {
|
||||
|
||||
/**
|
||||
* This method will create {@link User} object. It will ensure successful object creation even if password key is null in
|
||||
|
|
|
@ -45,5 +45,5 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public abstract class UserMixin {
|
||||
abstract class UserMixin {
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ import java.util.List;
|
|||
* @see UsernamePasswordAuthenticationTokenMixin
|
||||
* @since 4.2
|
||||
*/
|
||||
public class UsernamePasswordAuthenticationTokenDeserializer extends JsonDeserializer<UsernamePasswordAuthenticationToken> {
|
||||
class UsernamePasswordAuthenticationTokenDeserializer extends JsonDeserializer<UsernamePasswordAuthenticationToken> {
|
||||
|
||||
/**
|
||||
* This method construct {@link UsernamePasswordAuthenticationToken} object from serialized json.
|
||||
|
|
|
@ -44,5 +44,5 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
@JsonDeserialize(using = UsernamePasswordAuthenticationTokenDeserializer.class)
|
||||
public abstract class UsernamePasswordAuthenticationTokenMixin {
|
||||
abstract class UsernamePasswordAuthenticationTokenMixin {
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ import java.io.IOException;
|
|||
* @see CookieMixin
|
||||
* @since 4.2
|
||||
*/
|
||||
public class CookieDeserializer extends JsonDeserializer<Cookie> {
|
||||
class CookieDeserializer extends JsonDeserializer<Cookie> {
|
||||
|
||||
@Override
|
||||
public Cookie deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
|
||||
|
|
|
@ -36,5 +36,5 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
|
||||
@JsonDeserialize(using = CookieDeserializer.class)
|
||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public abstract class CookieMixin {
|
||||
abstract class CookieMixin {
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|||
*/
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DefaultCsrfTokenMixin {
|
||||
class DefaultCsrfTokenMixin {
|
||||
|
||||
/**
|
||||
* JsonCreator constructor needed by Jackson to create {@link org.springframework.security.web.csrf.DefaultCsrfToken}
|
||||
|
|
|
@ -40,5 +40,5 @@ import org.springframework.security.web.savedrequest.DefaultSavedRequest;
|
|||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
|
||||
@JsonDeserialize(builder = DefaultSavedRequest.Builder.class)
|
||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public abstract class DefaultSavedRequestMixin {
|
||||
abstract class DefaultSavedRequestMixin {
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import com.fasterxml.jackson.annotation.*;
|
|||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY,
|
||||
getterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public abstract class SavedCookieMixin {
|
||||
abstract class SavedCookieMixin {
|
||||
|
||||
@JsonCreator
|
||||
public SavedCookieMixin(@JsonProperty("name") String name, @JsonProperty("value") String value,
|
||||
|
|
|
@ -35,7 +35,7 @@ import com.fasterxml.jackson.annotation.*;
|
|||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE, creatorVisibility = JsonAutoDetect.Visibility.ANY)
|
||||
public class WebAuthenticationDetailsMixin {
|
||||
class WebAuthenticationDetailsMixin {
|
||||
|
||||
@JsonCreator
|
||||
WebAuthenticationDetailsMixin(@JsonProperty("remoteAddress") String remoteAddress,
|
||||
|
|
Loading…
Reference in New Issue