public static String getVersion ( ) { String FATHOM_PROPERTIES = "fathom/version.properties" ; String version = null ; URL url = ClassUtil . getResource ( FATHOM_PROPERTIES ) ; Preconditions . checkNotNull ( url , "Failed to find " + FATHOM_PROPERTIES ) ; try ( InputStream stream = url . openStream ( ) ) { Properties prop = new Properties ( ) ; prop . load ( stream ) ; version = prop . getProperty ( "version" ) ; } catch ( IOException e ) { LoggerFactory . getLogger ( Constants . class ) . error ( "Failed to read '{}'" , FATHOM_PROPERTIES , e ) ; } Preconditions . checkNotNull ( version , "The Fathom version is null!" ) ; return version ; }
Returns the running Fathom version .