io.castle.client.internal.config.PropertiesReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of castle-java Show documentation
Show all versions of castle-java Show documentation
Castle adds real-time monitoring of your authentication stack, instantly notifying you and your users
on potential account hijacks.
package io.castle.client.internal.config;
import javax.annotation.Nonnull;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class PropertiesReader {
public Properties loadPropertiesFromStream(Properties loaded, @Nonnull InputStream resourceAsStream) {
try (final InputStream streamFromFile = resourceAsStream) {
loaded.load(streamFromFile);
} catch (IOException e) {
//OK, no file configuration, create a empty new properties just for security against side effects of the
// failed load operation
return new Properties();
}
return loaded;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy