if (interfacePlatform.length >= 1 && interfacePlatform.length <= 3) String iface = trimToNull(interfacePlatform[0]); String name = (interfacePlatform.length >= 2) ? trimToNull(interfacePlatform[1]) : null; String arch = (interfacePlatform.length == 3) ? trimToNull(interfacePlatform[2]) : null; String impl = trimToNull(properties.getProperty(key)); if (iface == null) warning("Ignoring null interface=" + key + " from " + url); warning("Ignoring null implementation for key=" + key + " from " + url); warning("Ignoring duplicate default implementation=" + impl + " from " + url); if (platform.getName() == Platform.Name.UNKNOWN) warning("Ignoring unsupported platform=" + platform + " for key=" + key + " from " + url); warning("Ignoring duplicate implementation=" + impl + " for platform=" + platform + " from " + url); warning("Ignoring invalid entry=" + key + ", length=" + interfacePlatform.length + " from " + url);
/** * Adds the configuration from the specified URL. * * @param properties the configuration * @param url the URL, for error reporting. May be <tt>null</tt> */ protected void add(Properties properties, URL url) { Parser parser = createParser(platforms, url); parser.parse(properties, implementations); }
/** * Creates a new parser. * * @param platforms the platforms * @param url the source URL * @return a new parser */ protected Parser createParser(Platforms platforms, URL url) { return new Parser(platforms, url); }