protected static Properties getPropertiesResource ( URL resource ) { Properties answer = new Properties ( ) ; if ( resource != null ) { try ( InputStream stream = resource . openStream ( ) ) { answer . load ( stream ) ; } catch ( IOException e ) { throw new IllegalStateException ( "Error while reading resource from URL " + resource , e ) ; } } return answer ; }
Returns the given properties resource on the project classpath if found or an empty properties object if not