public static String getAppVersion ( ) { if ( appVersion != null ) return appVersion ; String appName = getAppId ( ) ; if ( "mdw" . equalsIgnoreCase ( appName ) ) { appVersion = getMdwVersion ( ) ; } else { appVersion = "Unknown" ; try { InputStream stream = ApplicationContext . class . getClassLoader ( ) . getResourceAsStream ( BUILD_VERSION_FILE ) ; if ( stream != null ) { appVersion = "" ; int i ; while ( ( i = stream . read ( ) ) != - 1 ) { appVersion += ( char ) i ; } stream . close ( ) ; } } catch ( Exception ex ) { logger . severeException ( ex . getMessage ( ) , ex ) ; } } return appVersion ; }
Returns the application version read from the build version file