mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
MNT-21902 minor fixes to logic added in REPO-5549
This commit is contained in:
@@ -60,14 +60,17 @@ public abstract class ConfigScheduler<Data>
|
||||
// Synchronized has little effect in normal operation, but on laptops that are suspended, there can be a number
|
||||
// of Threads calling execute concurrently without it, resulting in errors in the log. Theoretically possible in
|
||||
// production but not very likely.
|
||||
public synchronized void execute(JobExecutionContext context) throws JobExecutionException
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException
|
||||
{
|
||||
JobDataMap dataMap = context.getJobDetail().getJobDataMap();
|
||||
ConfigScheduler configScheduler = (ConfigScheduler)dataMap.get(CONFIG_SCHEDULER);
|
||||
synchronized (configScheduler)
|
||||
{
|
||||
boolean successReadingConfig = configScheduler.readConfigAndReplace(true);
|
||||
configScheduler.changeScheduleOnStateChange(successReadingConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final String CONFIG_SCHEDULER = "configScheduler";
|
||||
|
||||
|
@@ -322,7 +322,7 @@ public class CombinedConfig
|
||||
{
|
||||
combinedTransformers.remove(indexToRemove);
|
||||
// this may also require the current index i to be changed so we don't skip one.
|
||||
if (i <= indexToRemove)
|
||||
if (i >= indexToRemove)
|
||||
{
|
||||
i--;
|
||||
}
|
||||
|
Reference in New Issue
Block a user