/** * insert a script into the index using the script target class name as the index key. * @param script * @param index */ private void indexTarget(RuleScript script, Map<String, List<RuleScript>> index) { String key = script.getTargetClass(); // synchronize on the new script to avoid ant race with a deleting thread synchronized(script) { if (script.isDeleted()) { return; } synchronized (index) { List<RuleScript> entry = index.get(key); // always create a new list so that we don't affect any in progress iteration of the previous value if (entry == null) { entry = new ArrayList(); add(entry, script); } else { entry = new ArrayList(entry); add(entry, script); } index.put(key, entry); } } }
/** * insert a script into the index using the script target class name as the index key. * @param script * @param index */ private void indexTarget(RuleScript script, Map<String, List<RuleScript>> index) { String key = script.getTargetClass(); // synchronize on the new script to avoid ant race with a deleting thread synchronized(script) { if (script.isDeleted()) { return; } synchronized (index) { List<RuleScript> entry = index.get(key); // always create a new list so that we don't affect any in progress iteration of the previous value if (entry == null) { entry = new ArrayList(); add(entry, script); } else { entry = new ArrayList(entry); add(entry, script); } index.put(key, entry); } } }
if (script.isDeleted()) {
if (script.isDeleted()) {
if (!ruleScript.isDeleted()) { maybeDumpClassIntermediate(name, newBuffer); newBuffer = transform(ruleScript, loader, name, newBuffer);
if (!ruleScript.isDeleted()) { maybeDumpClassIntermediate(name, newBuffer); newBuffer = transform(ruleScript, loader, name, newBuffer);