Commit 0feeffd
fix: Add validation to JmsConfig.Builder.brokerUrl() (#183)
Added immediate validation in the brokerUrl() setter to provide
clear error messages at the point of error instead of later during build().
Changes:
- Validate brokerUrl is not null or empty/whitespace in setter
- Throw IllegalArgumentException with clear message
- Updated existing test to expect exception from setter
- Added tests for empty and whitespace-only brokerUrl
This provides:
- Clear, immediate error messages
- Better debugging experience
- Fail-fast behavior
- Consistent API with other builder classes
Fixes #183: JmsConfig.Builder.brokerUrl() doesn't validate parameter
is non-null/empty
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 41fd1db commit 0feeffd
2 files changed
Lines changed: 22 additions & 2 deletions
File tree
- jplatform-messaging-jms/src
- main/java/org/flossware/jplatform/messaging/jms
- test/java/org/flossware/jplatform/messaging/jms
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
51 | 67 | | |
52 | 68 | | |
53 | 69 | | |
| |||
0 commit comments