Fix generics warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1026409 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e0ec632d69
commit
b99de96fa5
@ -36,7 +36,7 @@ public class POILogFactory
|
||||
/**
|
||||
* Map of POILogger instances, with classes as keys
|
||||
*/
|
||||
private static Map _loggers = new HashMap();;
|
||||
private static Map<String,POILogger> _loggers = new HashMap<String,POILogger>();;
|
||||
|
||||
/**
|
||||
* A common instance of NullLogger, as it does nothing
|
||||
@ -108,11 +108,12 @@ public class POILogFactory
|
||||
// Fetch the right logger for them, creating
|
||||
// it if that's required
|
||||
if (_loggers.containsKey(cat)) {
|
||||
logger = ( POILogger ) _loggers.get(cat);
|
||||
logger = _loggers.get(cat);
|
||||
} else {
|
||||
try {
|
||||
Class loggerClass = Class.forName(_loggerClassName);
|
||||
logger = ( POILogger ) loggerClass.newInstance();
|
||||
Class<? extends POILogger> loggerClass =
|
||||
(Class<? extends POILogger>)Class.forName(_loggerClassName);
|
||||
logger = loggerClass.newInstance();
|
||||
logger.initialize(cat);
|
||||
} catch(Exception e) {
|
||||
// Give up and use the null logger
|
||||
|
Loading…
Reference in New Issue
Block a user