protected void refreshBundlesSynchronously(Collection<Bundle> bundles) {
		FrameworkWiring frameworkWiring = felixFramework.adapt(FrameworkWiring.class);
		final CountDownLatch latch = new CountDownLatch(1);
		frameworkWiring.refreshBundles(bundles, event -> {
			if (event.getType() == FrameworkEvent.ERROR) {
				Bundle bundle = event.getBundle();
				Msg.error(BundleHost.this,
					String.format("OSGi error refreshing bundle: %s", bundle));
			}
			latch.countDown();
		});
		try {
			latch.await();
		}
		catch (InterruptedException e) {
			Msg.error(this, "Exception waiting for bundles to refresh", e);
		}
	}
Refreshes the specified bundles. This forces the update (replacement) or removal of packages 
exported by the specified bundles.

@param bundles the bundles to refresh
@see FrameworkWiring#refreshBundles
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java