mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-03-01 10:59:16 +00:00
Resolve JavaType only once for whitelisted class
This commit is contained in:
parent
9d26f12e86
commit
5fde3044f7
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015-2018 the original author or authors.
|
* Copyright 2015-2019 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -225,7 +225,7 @@ public final class SecurityJackson2Modules {
|
|||||||
JavaType result = delegate.typeFromId(context, id);
|
JavaType result = delegate.typeFromId(context, id);
|
||||||
String className = result.getRawClass().getName();
|
String className = result.getRawClass().getName();
|
||||||
if (isWhitelisted(className)) {
|
if (isWhitelisted(className)) {
|
||||||
return delegate.typeFromId(context, id);
|
return result;
|
||||||
}
|
}
|
||||||
boolean isExplicitMixin = config.findMixInClassFor(result.getRawClass()) != null;
|
boolean isExplicitMixin = config.findMixInClassFor(result.getRawClass()) != null;
|
||||||
if (isExplicitMixin) {
|
if (isExplicitMixin) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user