I have this factory method in java:
public static Properties getConfigFactory() throws ClassNotFoundException, IOException {
if (config == null) {
Two points regarding exception handling best practices:
And you may throw the RuntimeException with or without inner exception, depending on what the caller can do with it. If you're not rethrowing the inner exception then you should log it in your method, if important.