mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
25.08.2014 77b43a1d03725669362ff6b4740b8650770a2efb
opendj-config/src/main/java/org/forgerock/opendj/config/ManagedObjectDefinitionResource.java
@@ -22,10 +22,13 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions copyright 2014 ForgeRock AS.
 */
package org.forgerock.opendj.config;
import static org.forgerock.util.Utils.closeSilently;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -113,12 +116,15 @@
                throw new MissingResourceException("Can't find resource " + path, baseName, "");
            }
            final InputStream is = new BufferedInputStream(stream);
            p = new Properties();
            try {
                p.load(new BufferedInputStream(stream));
                p.load(is);
            } catch (IOException e) {
                throw new MissingResourceException("Can't load resource " + path + " due to IO exception: "
                    + e.getMessage(), baseName, "");
                throw new MissingResourceException("Can't load resource " + path
                        + " due to IO exception: " + e.getMessage(), baseName, "");
            } finally {
                closeSilently(is);
            }
            // Cache the resource.