[midPoint-git] [Evolveum/midpoint] 45911f: Fix race condition in custom library invalidation

mederly noreply at github.com
Fri Nov 25 12:38:16 CET 2022


  Branch: refs/heads/support-4.4
  Home:   https://github.com/Evolveum/midpoint
  Commit: 45911f8d6a8f09302e96c4340e9a74fca7ea6bc4
      https://github.com/Evolveum/midpoint/commit/45911f8d6a8f09302e96c4340e9a74fca7ea6bc4
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/script/ScriptExpressionFactory.java
    M model/model-common/src/test/java/com/evolveum/midpoint/model/common/expression/ExpressionTestUtil.java
    M model/model-common/src/test/java/com/evolveum/midpoint/model/common/expression/TestExpression.java
    M model/model-common/src/test/java/com/evolveum/midpoint/model/common/expression/script/AbstractScriptTest.java
    M model/model-common/src/test/java/com/evolveum/midpoint/model/common/expression/script/TestScriptCaching.java
    M model/model-common/src/test/java/com/evolveum/midpoint/model/common/mapping/MappingTestEvaluator.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/importer/ObjectImporter.java
    M model/model-impl/src/main/resources/ctx-model.xml
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestFunctions.java
    A model/model-intest/src/test/resources/functions/function-library-testlib.xml
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/invalidation/Invalidator.java
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/expression/ExpressionFactory.java

  Log Message:
  -----------
  Fix race condition in custom library invalidation

During custom function libraries cache invalidation (in
ScriptExpressionFactory) there was a short time window during which
an empty cache could be used by mistake. It was between checking if
the cache is initialized and actually using its content. It is now
fixed.

This should resolve MID-8137.

(cherry picked from commit c964eff08d7c7b9aa41a7c814551b8367ed59cef)


  Commit: 16ba831a2febf5846274e5488bd586f702d12f07
      https://github.com/Evolveum/midpoint/commit/16ba831a2febf5846274e5488bd586f702d12f07
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/script/ScriptExpressionFactory.java

  Log Message:
  -----------
  Fix potential NPE in ScriptExpressionFactory


Compare: https://github.com/Evolveum/midpoint/compare/6a6118015153...16ba831a2feb


More information about the midPoint-svn mailing list