@Test public void testRemoveAnnotationHandlerNull() { assertThrows(NullPointerException.class, () -> collector.removeAnnotationHandler(null)); }
public void removeAnnotationHandler(String handler) { if (handler == null) { throw new NullPointerException("type"); } logger.note(LogLocation.LOG_FILE, "Removing " + handler); Set<String> keys = new LinkedHashSet<>(); for (String key : handlers.keySet()) { if (handler.equals(handlers.get(key))) { keys.add(key); } } for (String key : keys) { handlers.remove(key); } }
AnnotationHandlerCollector { public void removeAnnotationHandler(String handler) { if (handler == null) { throw new NullPointerException("type"); } logger.note(LogLocation.LOG_FILE, "Removing " + handler); Set<String> keys = new LinkedHashSet<>(); for (String key : handlers.keySet()) { if (handler.equals(handlers.get(key))) { keys.add(key); } } for (String key : keys) { handlers.remove(key); } } }
AnnotationHandlerCollector { public void removeAnnotationHandler(String handler) { if (handler == null) { throw new NullPointerException("type"); } logger.note(LogLocation.LOG_FILE, "Removing " + handler); Set<String> keys = new LinkedHashSet<>(); for (String key : handlers.keySet()) { if (handler.equals(handlers.get(key))) { keys.add(key); } } for (String key : keys) { handlers.remove(key); } } AnnotationHandlerCollector(Initializer initializer, Logger logger); }
AnnotationHandlerCollector { public void removeAnnotationHandler(String handler) { if (handler == null) { throw new NullPointerException("type"); } logger.note(LogLocation.LOG_FILE, "Removing " + handler); Set<String> keys = new LinkedHashSet<>(); for (String key : handlers.keySet()) { if (handler.equals(handlers.get(key))) { keys.add(key); } } for (String key : keys) { handlers.remove(key); } } AnnotationHandlerCollector(Initializer initializer, Logger logger); boolean isModified(); String getAnnotationHandler(String type, String handlerType); void load(); void removeAnnotationHandler(String handler); @Override String toString(); String toList(); Map<String, String> handlers(); void fromList(String input); }
AnnotationHandlerCollector { public void removeAnnotationHandler(String handler) { if (handler == null) { throw new NullPointerException("type"); } logger.note(LogLocation.LOG_FILE, "Removing " + handler); Set<String> keys = new LinkedHashSet<>(); for (String key : handlers.keySet()) { if (handler.equals(handlers.get(key))) { keys.add(key); } } for (String key : keys) { handlers.remove(key); } } AnnotationHandlerCollector(Initializer initializer, Logger logger); boolean isModified(); String getAnnotationHandler(String type, String handlerType); void load(); void removeAnnotationHandler(String handler); @Override String toString(); String toList(); Map<String, String> handlers(); void fromList(String input);  }