diff --git a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/dictionary/ExtItemDictionary.java b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/dictionary/ExtItemDictionary.java index d50cd0b5baa..0f60083f0ec 100644 --- a/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/dictionary/ExtItemDictionary.java +++ b/repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/dictionary/ExtItemDictionary.java @@ -91,18 +91,21 @@ private void fetchItemsAttempt() { } } + // TODO add "synchronized" before 4.0 release @NotNull - public synchronized RExtItem createOrFindItemDefinition(@NotNull ItemDefinition definition, boolean throwExceptionAfterCreate) { + public RExtItem createOrFindItemDefinition(@NotNull ItemDefinition definition, boolean throwExceptionAfterCreate) { return createOrFindItemByDefinitionInternal(definition, true, throwExceptionAfterCreate); } + // TODO add "synchronized" before 4.0 release @NotNull - public synchronized RExtItem createOrFindItemDefinition(@NotNull ItemDefinition definition) { + public RExtItem createOrFindItemDefinition(@NotNull ItemDefinition definition) { return createOrFindItemByDefinitionInternal(definition, true, true); } + // TODO add "synchronized" before 4.0 release @Nullable - public synchronized RExtItem findItemByDefinition(@NotNull ItemDefinition definition) { + public RExtItem findItemByDefinition(@NotNull ItemDefinition definition) { return createOrFindItemByDefinitionInternal(definition, false, true); } @@ -173,7 +176,8 @@ private void executeAttempts(String operationName, String operationVerb, Runnabl } } - public synchronized RExtItem getItemById(Integer extItemId) { + // TODO add "synchronized" before 4.0 release + public RExtItem getItemById(Integer extItemId) { boolean fresh = fetchItemsIfNeeded(); RExtItem extItem = itemsById.get(extItemId); if (extItem != null || fresh) {