-require-bnd (FILTER ( ‘,’ FILTER )* )?
Description: /** * Ensure that we are running on the correct bnd. */ void doRequireBnd() { Attrs require = OSGiHeader.parseProperties(getProperty(REQUIRE_BND)); if (require == null || require.isEmpty()) return;
Date: 2019-10-12T20:06:21-04:00

- # -require-bnd (FILTER ( ',' FILTER )* )?

      /**
       * Ensure that we are running on the correct bnd.
       */
      void doRequireBnd() {
      	Attrs require = OSGiHeader.parseProperties(getProperty(REQUIRE_BND));
      	if (require == null || require.isEmpty())
      		return;

      	Hashtable<String,String> map = new Hashtable<String,String>();
      	map.put(Constants.VERSION_FILTER, getBndVersion());

      	for (String filter : require.keySet()) {
      		try {
      			Filter f = new Filter(filter);
      			if (f.match(map))
      				continue;
      			error("%s fails %s", REQUIRE_BND, require.get(filter));
      		}
      		catch (Exception t) {
      			error("%s with value %s throws exception", t, REQUIRE_BND, require);
      		}
      	}
      }