String requiredParameter = REQUIRED_PARAMETERS[i]; if ((requiredParameter == null) || (requiredParameter.equals(""))) { throw new IllegalStateException("Required parameter '" + requiredParameter + "' is not set");
String parvalue = config.getProperty(REQUIRED_PARAMETERS[i]); if ((parvalue == null) || (parvalue.equals(""))) { log.logCritical("Required parameter '" + REQUIRED_PARAMETERS[i] + "' is not set"); throw new IllegalStateException();
    private Properties getConfig() {        final Properties config;        /* Validate config */        try {            config = (Properties) getServletContext().getAttribute(RequestUtil.PROP_CONFIG);        } catch (ClassCastException e) {            throw new IllegalStateException("Config is not correctly set in context.");        }        if (config == null)            throw new IllegalStateException("Config is not set in context.");        // Are we missing some required properties?        for (int i = 0; i < REQUIRED_PARAMETERS.length; i++) {            String requiredParameter = REQUIRED_PARAMETERS[i];            if ((requiredParameter == null) || (requiredParameter.equals(""))) {                    throw new IllegalStateException("Required parameter '" + requiredParameter + "' is not set");            }        }        return config;    }