Source:
<code>public final void onChange(ImporterChannelAssignment assignment) { if (m_stopping) return; ImmutableMap<URI, AbstractImporter> oldReference = m_importers.get(); ImmutableMap.Builder<URI, AbstractImporter> builder = new ImmutableMap.Builder<>(); builder.putAll(Maps.filterKeys(oldReference, notUriIn(assignment.getRemoved()))); List<AbstractImporter> toStop = new ArrayList<>(); for (URI removed: assignment.getRemoved()) { try { AbstractImporter importer = oldReference.get(removed); if (importer!=null) { toStop.add(importer); } } catch(Exception e) { s_logger.warn( String.format("Error calling stop on %s in importer %s", removed.toString(), m_factory.getTypeName()), e); } } List<AbstractImporter> newImporters = new ArrayList<>(); for (final URI added: assignment.getAdded()) { try { <START> AbstractImporter importer = m_factory.createImporter(m_configs.get(added)); <END> newImporters.add(importer); builder.put(added, importer); } catch(Exception e) { s_logger.warn("Error adding assignment " + added.toString() + " importer not found."); if (s_logger.isDebugEnabled()) { e.printStackTrace(); } } } ImmutableMap<URI, AbstractImporter> newReference = builder.build(); boolean success = m_importers.compareAndSet(oldReference, newReference); if (!m_stopping && success) { stopImporters(toStop); startImporters(newImporters); } }</code><technical_language>This is broad try catch for this. if m_configs.get(added) is null print error message continue added assignment loop</technical_language>

Target:
public final void onChange(ImporterChannelAssignment assignment) { if (m_stopping) return; ImmutableMap<URI, AbstractImporter> oldReference = m_importers.get(); ImmutableMap.Builder<URI, AbstractImporter> builder = new ImmutableMap.Builder<>(); builder.putAll(Maps.filterKeys(oldReference, notUriIn(assignment.getRemoved()))); List<AbstractImporter> toStop = new ArrayList<>(); List<String> missingRemovedURLs = new ArrayList<>(); List<String> missingAddedURLs = new ArrayList<>(); for (URI removed: assignment.getRemoved()) { if (m_configs.containsKey(removed)) { try { AbstractImporter importer = oldReference.get(removed); if (importer!=null) { toStop.add(importer); } } catch(Exception e) { s_logger.warn( String.format("Error calling stop on %s in importer %s", removed.toString(), m_factory.getTypeName()), e); } } else { missingRemovedURLs.add(removed.toString()); } } List<AbstractImporter> newImporters = new ArrayList<>(); for (final URI added: assignment.getAdded()) { if (m_configs.containsKey(added)) { AbstractImporter importer = m_factory.createImporter(m_configs.get(added)); newImporters.add(importer); builder.put(added, importer); } else { missingAddedURLs.add(added.toString()); } } if (!missingRemovedURLs.isEmpty() || !missingAddedURLs.isEmpty()) { s_logger.error("The source for Import has changed its configuration. Removed importer URL(s): (" + Joiner.on(", ").join(missingRemovedURLs) + "), added importer URL(s): (" + Joiner.on(", ").join(missingAddedURLs) + "). Pause and Resume the database to refresh the importer."); } ImmutableMap<URI, AbstractImporter> newReference = builder.build(); boolean success = m_importers.compareAndSet(oldReference, newReference); if (!m_stopping && success) { stopImporters(toStop); startImporters(newImporters); } }