Commit b20a4c7
authored
Replace active temp dests map with set (#2113)
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.1 parent 403ac4f commit b20a4c7
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 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
2151 | 2152 | | |
2152 | 2153 | | |
2153 | 2154 | | |
2154 | | - | |
| 2155 | + | |
2155 | 2156 | | |
2156 | 2157 | | |
2157 | 2158 | | |
| |||
2187 | 2188 | | |
2188 | 2189 | | |
2189 | 2190 | | |
2190 | | - | |
| 2191 | + | |
2191 | 2192 | | |
2192 | 2193 | | |
2193 | 2194 | | |
| |||
2575 | 2576 | | |
2576 | 2577 | | |
2577 | 2578 | | |
2578 | | - | |
| 2579 | + | |
2579 | 2580 | | |
2580 | 2581 | | |
2581 | 2582 | | |
2582 | | - | |
2583 | | - | |
2584 | | - | |
2585 | | - | |
| 2583 | + | |
2586 | 2584 | | |
2587 | 2585 | | |
2588 | 2586 | | |
2589 | | - | |
2590 | 2587 | | |
2591 | 2588 | | |
2592 | | - | |
| 2589 | + | |
2593 | 2590 | | |
2594 | 2591 | | |
2595 | 2592 | | |
| |||
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 | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 224 | + | |
| 225 | + | |
230 | 226 | | |
231 | 227 | | |
232 | 228 | | |
| |||
268 | 264 | | |
269 | 265 | | |
270 | 266 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 267 | + | |
| 268 | + | |
277 | 269 | | |
278 | 270 | | |
279 | 271 | | |
| |||
0 commit comments