-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Sébastien Deleuze opened SPR-15013 and commented
JsonObjectDecoder fails with ArrayIndexOutOfBoundsException: -1 error with this test case:
JsonObjectDecoder decoder = new JsonObjectDecoder();
Flux<DataBuffer> source =
Flux.just(stringBuffer("["), stringBuffer("{\"id\":1,\"name\":\"Robert\"}"), stringBuffer(","), stringBuffer("{\"id\":2,\"name\":\"Raide\"}"), stringBuffer(","), stringBuffer("{\"id\":3,\"name\":\"Ford\"}"), stringBuffer("]"));
Flux<String> output =
decoder.decode(source, null, null, Collections.emptyMap()).map(JsonObjectDecoderTests::toString);
StepVerifier.create(output)
.expectNext("{\"id\":1,\"name\":\"Robert\"}")
.expectNext("{\"id\":2,\"name\":\"Raide\"}")
.expectNext("{\"id\":3,\"name\":\"Ford\"}")
.expectComplete()
.verify();Affects: 5.0 M3
Issue Links:
- WebClient ArrayIndexOutOfBoundsException [SPR-14894] #19460 WebClient ArrayIndexOutOfBoundsException ("is duplicated by")
- JsonObjectDecoder fails to decode some splitted source [SPR-14859] #19425 JsonObjectDecoder fails to decode some splitted source
Referenced from: commits 4021d23
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug