Is getResourceAsStream() thread-safe?
<p>I need to read a properties file containing some configuration data in a JSF web application.</p>

<p>Right now the code looks like this</p>

<pre><code> private Properties getConfig() {
    Properties properties = new Properties();

    InputStream inputStream = null;
    try {
        inputStream = this.getClass().getResourceAsStream("/config.properties");

        try {
        properties.load(inputStream);
        } catch (IOException e) {
        logger.error("Error while reading config properties", e);
        }

    } finally {
        if (inputStream != null) {
        try {
            inputStream.close();
        } catch (IOException e) {
            logger.error(e.getMessage(), e);
        }
        }
    }

    return properties;
 }
</code></pre>

<p>Is it safe to do it this way or can I run into concurrency issues when multiple threads are calling getConfig()?</p>
