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:
@@ -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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,7 +58,7 @@ public class QueueChannelTests {
|
||||
}).start();
|
||||
assertFalse(messageReceived.get());
|
||||
channel.send(new GenericMessage<String>("testing"));
|
||||
latch.await(1000, TimeUnit.MILLISECONDS);
|
||||
latch.await(10000, TimeUnit.MILLISECONDS);
|
||||
assertTrue(messageReceived.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user