JarFile getBootProxyJarIfCurrent ( ) { File dataFile = bundleContext . getDataFile ( "boot-proxy.jar" ) ; if ( ! dataFile . exists ( ) ) { return null ; } JarFile jarFile = null ; try { jarFile = new JarFile ( dataFile ) ; Manifest manifest = jarFile . getManifest ( ) ; Attributes attrs = manifest . getMainAttributes ( ) ; String jarVersion = attrs . getValue ( MONITORING_VERSION_MANIFEST_HEADER ) ; if ( ! getCurrentVersion ( ) . equals ( jarVersion ) ) { jarFile . close ( ) ; jarFile = null ; } } catch ( Exception e ) { } return jarFile ; }
Get the boot proxy jar from the current data area if the code matches the current bundle version .