Commit 4e541f6
authored
For some reason ActiveMQConnection was using a map instead of a set to
store the destinations, and just stored the exact same thing as the key
and value. Furthermore, when checking if the map contained the
destination a call was being made to containsValue() which requires
iterating over the entire map.
This commit replaced the Map with a Set which simplifies things and
makes the contains() check constant. Also, the scope of the set was
changed from public to package because it makes no sense to have the
scope as public and should be limited to only classes in the same
package.
(cherry picked from commit b20a4c7)
1 parent ac2f60a commit 4e541f6
3 files changed
Lines changed: 12 additions & 23 deletions
File tree
- activemq-client/src/main/java/org/apache/activemq
- activemq-unit-tests/src/test/java/org/apache/activemq
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | | - | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
2128 | 2129 | | |
2129 | 2130 | | |
2130 | 2131 | | |
2131 | | - | |
| 2132 | + | |
2132 | 2133 | | |
2133 | 2134 | | |
2134 | 2135 | | |
| |||
2164 | 2165 | | |
2165 | 2166 | | |
2166 | 2167 | | |
2167 | | - | |
| 2168 | + | |
2168 | 2169 | | |
2169 | 2170 | | |
2170 | 2171 | | |
| |||
2527 | 2528 | | |
2528 | 2529 | | |
2529 | 2530 | | |
2530 | | - | |
| 2531 | + | |
2531 | 2532 | | |
2532 | 2533 | | |
2533 | 2534 | | |
2534 | | - | |
2535 | | - | |
2536 | | - | |
2537 | | - | |
| 2535 | + | |
2538 | 2536 | | |
2539 | 2537 | | |
2540 | 2538 | | |
2541 | | - | |
2542 | 2539 | | |
2543 | 2540 | | |
2544 | | - | |
| 2541 | + | |
2545 | 2542 | | |
2546 | 2543 | | |
2547 | 2544 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
Lines changed: 4 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 223 | + | |
| 224 | + | |
229 | 225 | | |
230 | 226 | | |
231 | 227 | | |
| |||
267 | 263 | | |
268 | 264 | | |
269 | 265 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 266 | + | |
| 267 | + | |
276 | 268 | | |
277 | 269 | | |
278 | 270 | | |
| |||
0 commit comments