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
|
* 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
|
* A common instance of NullLogger, as it does nothing
|
||||||
@ -108,11 +108,12 @@ public class POILogFactory
|
|||||||
// Fetch the right logger for them, creating
|
// Fetch the right logger for them, creating
|
||||||
// it if that's required
|
// it if that's required
|
||||||
if (_loggers.containsKey(cat)) {
|
if (_loggers.containsKey(cat)) {
|
||||||
logger = ( POILogger ) _loggers.get(cat);
|
logger = _loggers.get(cat);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
Class loggerClass = Class.forName(_loggerClassName);
|
Class<? extends POILogger> loggerClass =
|
||||||
logger = ( POILogger ) loggerClass.newInstance();
|
(Class<? extends POILogger>)Class.forName(_loggerClassName);
|
||||||
|
logger = loggerClass.newInstance();
|
||||||
logger.initialize(cat);
|
logger.initialize(cat);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
// Give up and use the null logger
|
// Give up and use the null logger
|
||||||
|
Loading…
Reference in New Issue
Block a user