Skip to content
Permalink
Browse files
add log when default to HashMap
  • Loading branch information
chickenlj committed Jun 29, 2020
1 parent 8763bfa commit ae090564e1f0ee759c7253c66266f838d57640c8
Showing 1 changed file with 5 additions and 0 deletions.
@@ -50,13 +50,17 @@

import java.util.ArrayList;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;

/**
* Loads a class from the classloader.
*/
public class ClassFactory
{
protected static final Logger log
= Logger.getLogger(ClassFactory.class.getName());
private static ArrayList<Allow> _staticAllowList;

private ClassLoader _loader;
@@ -76,6 +80,7 @@ public Class<?> load(String className)
return Class.forName(className, false, _loader);
}
else {
log.log(Level.SEVERE, className + " in blacklist or not in whitelist, deserialization with type 'HashMap' instead.");
return HashMap.class;
}
}

0 comments on commit ae09056

Please sign in to comment.