#vulnerable code 
                                @Override
    public void init(Map<String, String> initParams) {
        String dataBaseType = null;
        if(initParams.get("dataBaseType") != null) {
            dataBaseType = initParams.get("dataBaseType");
        }
        if (!StringUtils.isEmpty(dataBaseType) && hasType(dataBaseType)) {
            String path = "classpath:/database-" + dataBaseType + ".xml";
            NulsContext.setApplicationContext(new ClassPathXmlApplicationContext(new String[]{path}, true, NulsContext.getApplicationContext()));
        }
    } 
                            #location 7 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public void init(Map<String, String> initParams) {
        String databaseType = null;
        if(initParams.get("databaseType") != null) {
            databaseType = initParams.get("databaseType");
        }
        if (!StringUtils.isEmpty(databaseType) && hasType(databaseType)) {
            String path = "classpath:/database-" + databaseType + ".xml";
            NulsContext.setApplicationContext(new ClassPathXmlApplicationContext(new String[]{path}, true, NulsContext.getApplicationContext()));
        }
    }