Fix to null pointer.

This commit is contained in:
Bars107 2014-10-22 17:10:58 +03:00
parent edc9196b36
commit a76e3e9a1c

View file

@ -132,7 +132,9 @@ public class RendererRegistry {
@SuppressWarnings("resource")
private InputStream getInputStream(String name) throws FileNotFoundException {
InputStream is = null;
if(externalRenderers.containsKey(name)){
if("default".equalsIgnoreCase(name)) {
name = DEFAULT_RENDER;
} else if(externalRenderers.containsKey(name)){
is = new FileInputStream(externalRenderers.get(name));
} else if(internalRenderers.containsKey(name)){
is = RenderingRulesStorage.class.getResourceAsStream(internalRenderers.get(name));