1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-17 06:45:06 -05:00

* catch possible NPE

This commit is contained in:
Reinhard Pointner 2012-07-20 03:54:08 +00:00
parent 6963eb41eb
commit 7c44c29b11

View File

@ -78,14 +78,18 @@ public abstract class CachedResource<T extends Serializable> {
}
} else {
try {
if (element != null) {
product = type.cast(element.getValue());
}
} catch (Exception e) {
Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage());
}
}
try {
if (element != null) {
getCache().put(element);
}
} catch (Exception e) {
Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage());
}