Source:
<code>public void configure(Map stormConf, JsonNode jsonNode) { List<URLFilter> filterLists = new ArrayList<URLFilter>(); String name = getClass().getCanonicalName(); jsonNode = jsonNode.get(name); if (jsonNode == null) { LOG.info("No field in JSON config. Skipping", name); filters = new URLFilter[0]; return; } Iterator<JsonNode> filterIter = jsonNode.elements(); while (filterIter.hasNext()) { JsonNode afilterNode = filterIter.next(); String filterName = "<unnamed>"; JsonNode nameNode = afilterNode.get("name"); if (nameNode != null) { filterName = nameNode.textValue(); } JsonNode classNode = afilterNode.get("class"); if (classNode == null) { LOG.error("Filter doesn't specified a 'class' attribute", filterName); continue; } String className = classNode.textValue().trim(); filterName += '[' + className + ']'; try { Class<?> filterClass = Class.forName(className); boolean interfaceOK = URLFilter.class .isAssignableFrom(filterClass); if (!interfaceOK) { <START> LOG.error("Filter does not implement URLFilter", <END> filterName); continue; } URLFilter filterInstance = (URLFilter) filterClass .newInstance(); JsonNode paramNode = afilterNode.get("params"); if (paramNode != null) { filterInstance.configure(stormConf, paramNode); } else { filterInstance.configure(stormConf, NullNode.getInstance()); } filterLists.add(filterInstance); LOG.info("Loaded instance of class {}", className); } catch (Exception e) { LOG.error("Can't setup {}: {}", filterName, e); continue; } } filters = filterLists.toArray(new URLFilter[filterLists.size()]); }</code><technical_language>if implement URLFilter is is a class. is incorrect refer</technical_language>

Target:
public void configure(Map stormConf, JsonNode jsonNode) { List<URLFilter> filterLists = new ArrayList<URLFilter>(); String name = getClass().getCanonicalName(); jsonNode = jsonNode.get(name); if (jsonNode == null) { LOG.info("No field in JSON config. Skipping", name); filters = new URLFilter[0]; return; } Iterator<JsonNode> filterIter = jsonNode.elements(); while (filterIter.hasNext()) { JsonNode afilterNode = filterIter.next(); String filterName = "<unnamed>"; JsonNode nameNode = afilterNode.get("name"); if (nameNode != null) { filterName = nameNode.textValue(); } JsonNode classNode = afilterNode.get("class"); if (classNode == null) { LOG.error("Filter doesn't specified a 'class' attribute", filterName); continue; } String className = classNode.textValue().trim(); filterName += '[' + className + ']'; try { Class<?> filterClass = Class.forName(className); boolean interfaceOK = URLFilter.class .isAssignableFrom(filterClass); if (!interfaceOK) { LOG.error("Class does not implement URLFilter", className); continue; } URLFilter filterInstance = (URLFilter) filterClass .newInstance(); JsonNode paramNode = afilterNode.get("params"); if (paramNode != null) { filterInstance.configure(stormConf, paramNode); } else { filterInstance.configure(stormConf, NullNode.getInstance()); } filterLists.add(filterInstance); LOG.info("Loaded instance of class {}", className); } catch (Exception e) { LOG.error("Can't setup {}: {}", filterName, e); continue; } } filters = filterLists.toArray(new URLFilter[filterLists.size()]); }