Commit 084502a
authored
Make brokerName immutable in RegionBroker (#1917)
The brokerName should come from BrokerService and should only be
configured on first creation. This update changes RegionBroker so that
it gets the name from the broker service during construction and
verifies that it is not null.
The other benefit of this is that BrokerService always validates the
name has valid characters. This change also cleans up the name regex to
get rid of unnecessary escapes and also adds some regex tests.1 parent 3218266 commit 084502a
File tree
3 files changed
+46
-17
lines changed- activemq-broker/src/main/java/org/apache/activemq/broker
- region
- activemq-unit-tests/src/test/java/org/apache/activemq/broker
3 files changed
+46
-17
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1055 | 1055 | | |
1056 | 1056 | | |
1057 | 1057 | | |
1058 | | - | |
| 1058 | + | |
| 1059 | + | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | 1062 | | |
| |||
1064 | 1065 | | |
1065 | 1066 | | |
1066 | 1067 | | |
1067 | | - | |
| 1068 | + | |
1068 | 1069 | | |
1069 | | - | |
| 1070 | + | |
1070 | 1071 | | |
1071 | 1072 | | |
1072 | 1073 | | |
| |||
2408 | 2409 | | |
2409 | 2410 | | |
2410 | 2411 | | |
2411 | | - | |
2412 | 2412 | | |
2413 | 2413 | | |
2414 | 2414 | | |
| |||
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
| 142 | + | |
| 143 | + | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| |||
564 | 566 | | |
565 | 567 | | |
566 | 568 | | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | 569 | | |
575 | 570 | | |
576 | 571 | | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | 572 | | |
582 | 573 | | |
583 | 574 | | |
| |||
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 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 | + | |
98 | 136 | | |
99 | 137 | | |
100 | 138 | | |
| |||
0 commit comments