From bb45fb16709018842f858f1a6e1118676aaa34bd Mon Sep 17 00:00:00 2001
From: Tatu Saloranta <tatu.saloranta@iki.fi>
Date: Tue, 19 Dec 2017 08:31:15 -0800
Subject: [PATCH] Fix issues with earlier fix for #1855
---
.../jackson/databind/jsontype/impl/SubTypeValidator.java | 5 +++--
.../jackson/databind/interop/IllegalTypesCheckTest.java | 7 +++++++
.../springframework/jacksontest/AbstractApplicationContext.java | 5 +++++
.../org/springframework/jacksontest/AbstractPointcutAdvisor.java | 5 +++++
.../org/springframework/jacksontest/BogusApplicationContext.java | 9 +++++++++
.../org/springframework/jacksontest/BogusPointcutAdvisor.java | 9 +++++++++
6 files changed, 38 insertions(+), 2 deletions(-)
create mode 100644 src/test/java/org/springframework/jacksontest/AbstractApplicationContext.java
create mode 100644 src/test/java/org/springframework/jacksontest/AbstractPointcutAdvisor.java
create mode 100644 src/test/java/org/springframework/jacksontest/BogusApplicationContext.java
create mode 100644 src/test/java/org/springframework/jacksontest/BogusPointcutAdvisor.java
diff --git a/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java b/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
index 8a273cc15..45a76169f 100644
--- a/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
+++ b/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java
@@ -71,6 +71,7 @@ public void validateSubType(DeserializationContext ctxt, JavaType type) throws J
final Class<?> raw = type.getRawClass();
String full = raw.getName();
+ main_check:
do {
if (_cfgIllegalClassNames.contains(full)) {
break;
@@ -84,8 +85,8 @@ public void validateSubType(DeserializationContext ctxt, JavaType type) throws J
// looking for "AbstractBeanFactoryPointcutAdvisor" but no point to allow any is there?
if ("AbstractPointcutAdvisor".equals(name)
// ditto for "FileSystemXmlApplicationContext": block all ApplicationContexts
- || "AbstractApplicationContext.equals".equals(name)) {
- break;
+ || "AbstractApplicationContext".equals(name)) {
+ break main_check;
}
}
}