|
20 | 20 | import java.util.List; |
21 | 21 | import java.util.Map; |
22 | 22 | import java.util.Set; |
| 23 | +import java.util.Collections; |
23 | 24 | import java.util.concurrent.ConcurrentLinkedQueue; |
24 | 25 | import java.util.concurrent.atomic.AtomicBoolean; |
25 | 26 |
|
@@ -142,7 +143,7 @@ public void setEndpoints(String notify, String sessions) throws IllegalArgumentE |
142 | 143 | * @throws IllegalArgumentException if the endpoint configuration is null or if |
143 | 144 | * the notify endpoint is empty or null |
144 | 145 | */ |
145 | | - public void setEndpoints(EndpointConfiguration endpointConfiguration) throws IllegalArgumentException { |
| 146 | + public synchronized void setEndpoints(EndpointConfiguration endpointConfiguration) throws IllegalArgumentException { |
146 | 147 | if (endpointConfiguration == null) { |
147 | 148 | throw new IllegalArgumentException("Endpoint configuration cannot be null."); |
148 | 149 | } |
@@ -245,35 +246,35 @@ public void setSessionDelivery(Delivery sessionDelivery) { |
245 | 246 | } |
246 | 247 |
|
247 | 248 | public String[] getRedactedKeys() { |
248 | | - return redactedKeys; |
| 249 | + return redactedKeys == null ? null : redactedKeys.clone(); |
249 | 250 | } |
250 | 251 |
|
251 | 252 | public void setRedactedKeys(String[] redactedKeys) { |
252 | | - this.redactedKeys = redactedKeys; |
| 253 | + this.redactedKeys = redactedKeys == null ? null : redactedKeys.clone(); |
253 | 254 | } |
254 | 255 |
|
255 | 256 | public String[] getDiscardClasses() { |
256 | | - return discardClasses; |
| 257 | + return discardClasses == null ? null : discardClasses.clone(); |
257 | 258 | } |
258 | 259 |
|
259 | 260 | public void setDiscardClasses(String[] discardClasses) { |
260 | | - this.discardClasses = discardClasses; |
| 261 | + this.discardClasses = discardClasses == null ? null : discardClasses.clone(); |
261 | 262 | } |
262 | 263 |
|
263 | 264 | public Set<String> getEnabledReleaseStages() { |
264 | | - return enabledReleaseStages; |
| 265 | + return enabledReleaseStages == null ? null : Collections.unmodifiableSet(enabledReleaseStages); |
265 | 266 | } |
266 | 267 |
|
267 | 268 | public void setEnabledReleaseStages(Set<String> enabledReleaseStages) { |
268 | 269 | this.enabledReleaseStages = enabledReleaseStages; |
269 | 270 | } |
270 | 271 |
|
271 | 272 | public String[] getProjectPackages() { |
272 | | - return projectPackages; |
| 273 | + return projectPackages == null ? null : projectPackages.clone(); |
273 | 274 | } |
274 | 275 |
|
275 | 276 | public void setProjectPackages(String[] projectPackages) { |
276 | | - this.projectPackages = projectPackages; |
| 277 | + this.projectPackages = projectPackages == null ? null : projectPackages.clone(); |
277 | 278 | } |
278 | 279 |
|
279 | 280 | public String getReleaseStage() { |
|
0 commit comments