Commit f775edf
Fix POJO functions to return Message consistently
POJO functions now return Message when input is Message, maintaining
consistency with regular Function implementations. This ensures headers
are preserved in POJO functions just like regular functions.
Changes:
- Add isPojoFunction flag to identify POJO functions
- Mark POJO functions during discovery
- Re-wrap output in Message for POJO functions when input is Message
- Add test verifying Message return with header preservation
- Add test verifying plain String input returns plain String output
Fixes gh-1307
Signed-off-by: kjg <[email protected]>
Resolves #13111 parent c313d38 commit f775edf
File tree
3 files changed
+84
-2
lines changed- spring-cloud-function-context/src
- main/java/org/springframework/cloud/function/context/catalog
- test/java/org/springframework/cloud/function/context/catalog
3 files changed
+84
-2
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
294 | 305 | | |
295 | 306 | | |
296 | 307 | | |
| |||
443 | 454 | | |
444 | 455 | | |
445 | 456 | | |
| 457 | + | |
| 458 | + | |
446 | 459 | | |
447 | 460 | | |
448 | 461 | | |
| |||
498 | 511 | | |
499 | 512 | | |
500 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
501 | 522 | | |
502 | 523 | | |
503 | 524 | | |
| |||
1259 | 1280 | | |
1260 | 1281 | | |
1261 | 1282 | | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
1262 | 1291 | | |
1263 | 1292 | | |
1264 | 1293 | | |
| |||
Lines changed: 50 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
103 | 151 | | |
104 | 152 | | |
105 | 153 | | |
| |||
0 commit comments