UpgradeFilters implements Serializable { public synchronized void upgrade() { if (!filtersUpgraded) { try { ScriptFilterDao filterDao = new ScriptFilterDao(); ScriptFilterActionDao actionDao = new ScriptFilterActionDao(); List<ScriptFilter> all = filterDao.findAll(); Set<Integer> toDelete = actionDao.findAll().stream().map(BaseEntity::getId).collect(Collectors.toSet()); for (ScriptFilter filter : all) { for (ScriptFilterAction action : filter.getActions()) { toDelete.remove(action.getId()); String value = action.getValue(); String original = value; if (value.startsWith("@") && value.lastIndexOf('@') == 0) { value = "#{" + value.substring(1) + "}"; } else if (value.startsWith(FUNCTION_STRING_CONCAT_FULL)) { value = value.substring(FUNCTION_STRING_CONCAT_FULL.length()); } else if (value.startsWith(FUNCTION_STRING_CONCAT)) { value = processConcat(value); } else if (value.startsWith(FUNCTION_STRING_GET_CSV)) { value = processFunction("ioFunctions.getCSVData", value); } else if (value.indexOf('@') != -1) { value = replaceVariables(value); } if (!original.equals(value)) { action.setValue(value); actionDao.saveOrUpdate(action); } } } for (Integer id : toDelete) { actionDao.delete(id); } filtersUpgraded = true; } catch (Exception e) { LOG.error("Error upgrading filters: " + e, e); } } }  boolean isDisabled(); synchronized void upgrade();  }
@Test public void testUpgrade_1() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_2() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_3() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_4() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_5() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_6() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_7() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_8() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_9() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_10() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_11() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_12() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_13() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_14() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_15() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }
@Test public void testUpgrade_16() throws Exception { UpgradeFilters fixture = new UpgradeFilters(); fixture.upgrade(); }