try { setFilters((FilterHolder[])LazyList.addToArray(holders, holder, FilterHolder.class));  FilterMapping mapping = new FilterMapping(); mapping.setFilterName(holder.getName()); mapping.setPathSpec(pathSpec); mapping.setDispatches(dispatches); setFilterMappings((FilterMapping[])LazyList.addToArray(getFilterMappings(), mapping, FilterMapping.class)); } catch (RuntimeException e) { setFilters(holders); throw e; } catch (Error e) { setFilters(holders); throw e; }
return holder;
    public void addFilterWithMapping (FilterHolder holder,String pathSpec,int dispatches)    {        FilterHolder[] holders = getFilters();        if (holders!=null)            holders = (FilterHolder[])holders.clone();                try        {            setFilters((FilterHolder[])LazyList.addToArray(holders, holder, FilterHolder.class));                        FilterMapping mapping = new FilterMapping();            mapping.setFilterName(holder.getName());            mapping.setPathSpec(pathSpec);            mapping.setDispatches(dispatches);            setFilterMappings((FilterMapping[])LazyList.addToArray(getFilterMappings(), mapping, FilterMapping.class));        }        catch (RuntimeException e)        {            setFilters(holders);            throw e;        }        catch (Error e)        {            setFilters(holders);            throw e;        }                }