Commit fc2b146
Throwing NoContentException when InputStream is empty
Since JAX-RS 2.1 an MBR must react upon an empty stream either with an
empty instance or with NoContentException, but Jersey's JSON-B MBR does
neither - it simply throws ProcessingException:
"In case the entity input stream is empty, the reader is expected to either return a
Java representation of a zero-length entity or throw a javax.ws.rs.core.NoContentException
in case no zero-length entity representation is defined for the supported Java type."
Signed-off-by: Markus KARG <markus@headcrashing.eu>1 parent 7c67bae commit fc2b146
File tree
1 file changed
+19
-0
lines changed- media/json-binding/src/main/java/org/glassfish/jersey/jsonb/internal
1 file changed
+19
-0
lines changedLines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
73 | 91 | | |
| 92 | + | |
74 | 93 | | |
75 | 94 | | |
76 | 95 | | |
| |||
0 commit comments