diff --git a/src/main/java/com/alipay/hessian/NameBlackListFilter.java b/src/main/java/com/alipay/hessian/NameBlackListFilter.java index c84c72f..a914c2d 100644 --- a/src/main/java/com/alipay/hessian/NameBlackListFilter.java +++ b/src/main/java/com/alipay/hessian/NameBlackListFilter.java @@ -169,5 +169,8 @@ protected boolean inBlackList(String className) { public static void setAddBlackPrefixList(List addBlackPrefixList) { NameBlackListFilter.addBlackPrefixList = addBlackPrefixList; + if (resultOfInBlackList != null) { + resultOfInBlackList.clear(); + } } } diff --git a/src/main/java/com/caucho/hessian/io/SerializerFactory.java b/src/main/java/com/caucho/hessian/io/SerializerFactory.java index 18a5522..6b5efef 100644 --- a/src/main/java/com/caucho/hessian/io/SerializerFactory.java +++ b/src/main/java/com/caucho/hessian/io/SerializerFactory.java @@ -456,6 +456,14 @@ public Deserializer getDeserializer(String type) if (type == null || type.equals("")) return null; + if (classNameResolver != null) { + try { + type = classNameResolver.resolve(type); + } catch (Exception e) { + throw new HessianProtocolException(e); + } + } + Deserializer deserializer; deserializer = (Deserializer) _cachedTypeDeserializerMap.get(type); @@ -467,14 +475,6 @@ public Deserializer getDeserializer(String type) if (deserializer != null) return deserializer; - if (classNameResolver != null) { - try { - type = classNameResolver.resolve(type); - } catch (Exception e) { - throw new HessianProtocolException(e); - } - } - if (type.startsWith("[")) { Deserializer subDeserializer = getDeserializer(type.substring(1)); deserializer = new ArrayDeserializer(subDeserializer);