CompoundHighlighter extends AbstractHighlighter implements UIDependent { public void removeHighlighter(Highlighter hl) { boolean success = highlighters.remove(hl); if (success) { hl.removeChangeListener(getHighlighterChangeListener()); fireStateChanged(); } } CompoundHighlighter(Highlighter... inList);  CompoundHighlighter(HighlightPredicate predicate, Highlighter... inList); void setHighlighters(Highlighter... inList); void addHighlighter(Highlighter highlighter); void addHighlighter(Highlighter highlighter, boolean prepend); void removeHighlighter(Highlighter hl); Highlighter[] getHighlighters(); @Override void updateUI(); static final Highlighter[] EMPTY_HIGHLIGHTERS; }
@Test public void testRemoveFromEmptyCompoundHighlighter() { CompoundHighlighter pipeline = new CompoundHighlighter(); pipeline.removeHighlighter(new ColorHighlighter()); }