Skip to content

Commit

Permalink
Fix issue with Enrich mediator after Json Path Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
dulanjalidilmi committed Feb 19, 2024
1 parent ffe18c3 commit df78b05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Checkout MI
uses: actions/checkout@v1
with:
repository: dulanjalidilmi/micro-integrator
ref: refs/heads/master-dependency
repository: wso2/micro-integrator
ref: refs/heads/master
- name: Build MI with Maven
run: mvn clean install -Dsynapse.version=$(cat ../SYNAPSE_VERSION_FILE) -fae --file ../micro-integrator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,8 @@ private String removeJSONFromString(MessageContext synCtx, String inputString, S
if (path.equals("$") || path.equals("$.")) {
result = "";
} else {
Object list = JsonPath.compile(path).read(result);
if (!((JsonArray) list).isEmpty()) {
JsonElement list = JsonPath.parse(result).read(path);
if (!(list instanceof JsonArray) || !((JsonArray) list).isEmpty()) {
DocumentContext doc = JsonPath.parse(result);
doc.delete(path);
result = doc.jsonString();
Expand Down

0 comments on commit df78b05

Please sign in to comment.