InputStream in = findVMProfile(); Properties profileProps = new Properties(); if (in != null) { try { profileProps.load(new BufferedInputStream(in)); } catch (IOException e) {  } finally { try { in.close(); } catch (IOException ee) {  } } }
Properties profileProps = findVMProfile();
	private void loadVMProfile() {		InputStream in = findVMProfile();		Properties profileProps = new Properties();		if (in != null) {			try {				profileProps.load(new BufferedInputStream(in));			} catch (IOException e) {				// do nothing			} finally {				try {					in.close();				} catch (IOException ee) {					// do nothing				}			}		}		String systemExports = properties.getProperty(Constants.OSGI_FRAMEWORK_SYSTEM_PACKAGES);		// set the system exports property using the vm profile; only if the property is not already set		if (systemExports == null) {			systemExports = profileProps.getProperty(Constants.OSGI_FRAMEWORK_SYSTEM_PACKAGES);			if (systemExports != null)				properties.put(Constants.OSGI_FRAMEWORK_SYSTEM_PACKAGES, systemExports);		}		// set the org.osgi.framework.bootdelegation property according to the java profile		String type = properties.getProperty(Constants.OSGI_JAVA_PROFILE_BOOTDELEGATION); // a null value means ignore		String profileBootDelegation = profileProps.getProperty(Constants.OSGI_BOOTDELEGATION);		if (Constants.OSGI_BOOTDELEGATION_OVERRIDE.equals(type)) {			if (profileBootDelegation == null)				properties.remove(Constants.OSGI_BOOTDELEGATION); // override with a null value			else				properties.put(Constants.OSGI_BOOTDELEGATION, profileBootDelegation); // override with the profile value		} else if (Constants.OSGI_BOOTDELEGATION_NONE.equals(type))			properties.remove(Constants.OSGI_BOOTDELEGATION); // remove the bootdelegation property in case it was set	}