There isn't any useful state in the PropertyFileLoader
, nor will there be any subclass of PropertyFileLoader
that will have state. I think that all you need is a static method (basically your second version, but not swallowing the exception):
public class PropertyFileLoader throws IOException {
public static Properties load(String filename) throws IOException {
…
}
}