Various polishing and optimizations

* Check for `null` package in the `JacksonJsonUtils`.
Also don't call `this.delegate.typeFromId()` the second time
* Increase wait timeout in the `QueueChannelTests`
* Check `ZookeeperMetadataStore.addListener()` for `null`

**Cherry-pick to 4.3.x**
This commit is contained in:
Artem Bilan
2017-07-14 16:31:46 -04:00
parent 748feea0f8
commit 7a67c1f1a3
4 changed files with 24 additions and 10 deletions

View File

@@ -196,9 +196,9 @@ public final class JacksonJsonUtils {
DeserializationConfig config = (DeserializationConfig) context.getConfig();
JavaType result = this.delegate.typeFromId(context, id);
String packageName = result.getRawClass().getPackage().getName();
if (isTrustedPackage(packageName)) {
return this.delegate.typeFromId(context, id);
Package aPackage = result.getRawClass().getPackage();
if (aPackage == null || isTrustedPackage(aPackage.getName())) {
return result;
}
boolean isExplicitMixin = config.findMixInClassFor(result.getRawClass()) != null;