You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "Friedrich Ulrich (Jira)" <ji...@apache.org> on 2019/09/24 15:13:00 UTC
[jira] [Closed] (JOHNZON-280) Removing an entry from an array in an
object with more than one array fails
[ https://issues.apache.org/jira/browse/JOHNZON-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Friedrich Ulrich closed JOHNZON-280.
------------------------------------
Fix Version/s: 1.2.0
Resolution: Fixed
Work in 1.2.0 and master.
> Removing an entry from an array in an object with more than one array fails
> ---------------------------------------------------------------------------
>
> Key: JOHNZON-280
> URL: https://issues.apache.org/jira/browse/JOHNZON-280
> Project: Johnzon
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.12, 1.1.13
> Reporter: Friedrich Ulrich
> Priority: Major
> Fix For: 1.2.0
>
>
> Code to reproduce:
> {{JsonObject base = Json.createObjectBuilder()}}
> {{ .add("foo", Json.createArrayBuilder().add("foo").add("bar").build())}}
> {{ .add("bar", Json.createArrayBuilder().build())}}
> {{ .build();}}
> JsonPatch p = Json.createPatchBuilder().remove("/foo/0").build();
> p.apply(base);
>
> {{Throws an execption:}}
> {{javax.json.JsonException: '[]' contains no element for index 0}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)