Skip to content

Commit

Permalink
add log when default to HashMap
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Jun 29, 2020
1 parent 8763bfa commit ae09056
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down

0 comments on commit ae09056

Please sign in to comment.