Skip to content

Commit

Permalink
better handeling of missing source values
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed May 10, 2024
1 parent 18e2642 commit ab96186
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import static jakarta.json.JsonValue.EMPTY_JSON_OBJECT;
import static jakarta.json.JsonValue.NULL;
import static jakarta.json.JsonValue.ValueType.ARRAY;
import static jakarta.json.JsonValue.ValueType.OBJECT;

import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -171,7 +170,7 @@ private JsonValue transform(final TransformationCtx ctx, final List<String> sour
return ctx.getLocalResult();
}
final String rootOrResultPointer = resultPointers.isEmpty() ? "" : resultPointers.get(0);
final JsonValue fixedResult = Utils.fixPath(ctx.getLocalResult(), append ? ARRAY : OBJECT, rootOrResultPointer);
final JsonValue fixedResult = Utils.fixPath(ctx.getLocalResult(), ARRAY, rootOrResultPointer);
if (!Utils.isArray(sourceValue)) {
return fixedResult;
}
Expand Down

0 comments on commit ab96186

Please sign in to comment.