code: @Override
      public Collection<Bundle> getBundles() {
          if (mfDetails == null)
              throw new IllegalStateException("Method called outside of provisioining operation or without a registered service");
  
          Collection<Bundle> bundles = featureBundles.get();
  
          if (bundles == null) {
              bundles = new ArrayList<Bundle>();
  
              Collection<FeatureResource> bundlesInFeature = mfDetails.getConstituents(SubsystemContentType.BUNDLE_TYPE);
  
              BundleContext ctx = FrameworkUtil.getBundle(FrameworkUtil.class).getBundleContext();
  
              // symbolic name to bundle map. 
              for (FeatureResource bundle : bundlesInFeature) {
                  String location = bundle.getLocation();
                  Bundle b = ctx.getBundle(location);
                  if (b != null) {
                      bundles.add(b);
                  }
              }
  
              // make an unmodifiable version.
              bundles = Collections.unmodifiableCollection(bundles);
  
              // store it away if it hasn't already been read. If this is read by another
              // thread at once then this thread will get this collection, and others will
              // the winner's.
              featureBundles.compareAndSet(null, bundles);
          }
  
          return bundles;
      }
docs: /*
  (non-Javadoc)
  
  @see com.ibm.wsspi.kernel.feature.LibertyFeature#getBundles()