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,12 +60,15 @@ public abstract class ConfigScheduler<Data>
|
|||||||
// Synchronized has little effect in normal operation, but on laptops that are suspended, there can be a number
|
// 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
|
// of Threads calling execute concurrently without it, resulting in errors in the log. Theoretically possible in
|
||||||
// production but not very likely.
|
// 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();
|
JobDataMap dataMap = context.getJobDetail().getJobDataMap();
|
||||||
ConfigScheduler configScheduler = (ConfigScheduler)dataMap.get(CONFIG_SCHEDULER);
|
ConfigScheduler configScheduler = (ConfigScheduler)dataMap.get(CONFIG_SCHEDULER);
|
||||||
boolean successReadingConfig = configScheduler.readConfigAndReplace(true);
|
synchronized (configScheduler)
|
||||||
configScheduler.changeScheduleOnStateChange(successReadingConfig);
|
{
|
||||||
|
boolean successReadingConfig = configScheduler.readConfigAndReplace(true);
|
||||||
|
configScheduler.changeScheduleOnStateChange(successReadingConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -322,7 +322,7 @@ public class CombinedConfig
|
|||||||
{
|
{
|
||||||
combinedTransformers.remove(indexToRemove);
|
combinedTransformers.remove(indexToRemove);
|
||||||
// this may also require the current index i to be changed so we don't skip one.
|
// this may also require the current index i to be changed so we don't skip one.
|
||||||
if (i <= indexToRemove)
|
if (i >= indexToRemove)
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user