Commit 9a3530a
committed
fix(client): validate inputs before UnsupportedOperationException in shared consumer methods (#1719)
The shared consumer methods (createSharedConsumer, createSharedDurableConsumer)
threw UnsupportedOperationException immediately without validating inputs.
Per the JMS spec, parameter validation must happen first:
- Session: null topic now throws InvalidDestinationException, invalid
selector now throws InvalidSelectorException
- JMSContext: null topic now throws InvalidDestinationRuntimeException
This fixes the TCK invalidDestinationExceptionTests and
invalidSelectorExceptionTopicTests for Session, and the corresponding
JMSContext tests.1 parent ee63e25 commit 9a3530a
File tree
2 files changed
+41
-1
lines changed- activemq-client/src/main/java/org/apache/activemq
2 files changed
+41
-1
lines changedLines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
445 | 450 | | |
446 | 451 | | |
447 | 452 | | |
448 | 453 | | |
449 | 454 | | |
450 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
451 | 460 | | |
452 | 461 | | |
453 | 462 | | |
454 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
455 | 468 | | |
456 | 469 | | |
457 | 470 | | |
458 | 471 | | |
459 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
460 | 477 | | |
461 | 478 | | |
462 | 479 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
1386 | 1387 | | |
1387 | 1388 | | |
1388 | 1389 | | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
1389 | 1394 | | |
1390 | 1395 | | |
1391 | 1396 | | |
1392 | 1397 | | |
1393 | 1398 | | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
1394 | 1406 | | |
1395 | 1407 | | |
1396 | 1408 | | |
| |||
1408 | 1420 | | |
1409 | 1421 | | |
1410 | 1422 | | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1411 | 1427 | | |
1412 | 1428 | | |
1413 | 1429 | | |
1414 | 1430 | | |
1415 | 1431 | | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
1416 | 1439 | | |
1417 | 1440 | | |
1418 | 1441 | | |
| |||
0 commit comments