From dece01f8ba5d5ac29f044a44af4a6f8afd9a9eda Mon Sep 17 00:00:00 2001 From: Sergey Sitnikov Date: Fri, 9 Aug 2019 21:11:18 +0700 Subject: [PATCH] ConfigurationException cleanup (#15431) Part of User-facing exception cleanup PRD/TDD --- .../java/com/hazelcast/config/Config.java | 138 ++++++++++++------ .../hazelcast/config/DomVariableReplacer.java | 11 +- .../dynamicconfig/ConfigCheckMode.java | 5 +- .../dynamicconfig/ConfigurationService.java | 6 +- .../cache/impl/CacheServiceTest.java | 2 +- 5 files changed, 107 insertions(+), 55 deletions(-) diff --git a/hazelcast/src/main/java/com/hazelcast/config/Config.java b/hazelcast/src/main/java/com/hazelcast/config/Config.java index 52707f202c73..cffe8011aad5 100644 --- a/hazelcast/src/main/java/com/hazelcast/config/Config.java +++ b/hazelcast/src/main/java/com/hazelcast/config/Config.java @@ -392,7 +392,8 @@ public Config setNetworkConfig(NetworkConfig networkConfig) { * * @param name name of the map config * @return the map configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -415,7 +416,8 @@ public MapConfig findMapConfig(String name) { * * @param name name of the map config * @return the map configuration or {@code null} if none was found - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -447,7 +449,8 @@ public MapConfig getMapConfigOrNull(String name) { * * @param name name of the map config * @return the map configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -507,7 +510,8 @@ public Config setMapConfigs(Map mapConfigs) { * * @param name name of the cardinality estimator config * @return the cache configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -528,7 +532,8 @@ public CacheSimpleConfig findCacheConfig(String name) { * * @param name name of the cache config * @return the cache configuration or {@code null} if none was found - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -560,7 +565,8 @@ public CacheSimpleConfig findCacheConfigOrNull(String name) { * * @param name name of the cache config * @return the cache configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -621,7 +627,8 @@ public Config setCacheConfigs(Map cacheConfigs) { * * @param name name of the queue config * @return the queue configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -658,7 +665,8 @@ public QueueConfig findQueueConfig(String name) { * * @param name name of the queue config * @return the queue configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -719,7 +727,8 @@ public Config setQueueConfigs(Map queueConfigs) { * * @param name name of the lock config * @return the lock configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -756,7 +765,8 @@ public LockConfig findLockConfig(String name) { * * @param name name of the lock config * @return the lock configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -817,7 +827,8 @@ public Config setLockConfigs(Map lockConfigs) { * * @param name name of the list config * @return the list configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -854,7 +865,8 @@ public ListConfig findListConfig(String name) { * * @param name name of the list config * @return the list configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -915,7 +927,8 @@ public Config setListConfigs(Map listConfigs) { * * @param name name of the set config * @return the set configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -952,7 +965,8 @@ public SetConfig findSetConfig(String name) { * * @param name name of the set config * @return the set configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1013,7 +1027,8 @@ public Config setSetConfigs(Map setConfigs) { * * @param name name of the multimap config * @return the multimap configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1050,7 +1065,8 @@ public MultiMapConfig findMultiMapConfig(String name) { * * @param name name of the multimap config * @return the multimap configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1111,7 +1127,8 @@ public Config setMultiMapConfigs(Map multiMapConfigs) { * * @param name name of the replicated map config * @return the replicated map configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1149,7 +1166,8 @@ public ReplicatedMapConfig findReplicatedMapConfig(String name) { * * @param name name of the replicated map config * @return the replicated map configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1210,7 +1228,8 @@ public Config setReplicatedMapConfigs(Map replicate * * @param name name of the ringbuffer config * @return the ringbuffer configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1248,7 +1267,8 @@ public RingbufferConfig findRingbufferConfig(String name) { * * @param name name of the ringbuffer config * @return the ringbuffer configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1308,7 +1328,8 @@ public Config setRingbufferConfigs(Map ringbufferConfi * * @param name name of the AtomicLong config * @return the AtomicLong configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1344,7 +1365,8 @@ public AtomicLongConfig findAtomicLongConfig(String name) { * * @param name name of the AtomicLong config * @return the AtomicLong configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1402,7 +1424,8 @@ public Config setAtomicLongConfigs(Map atomicLongConfi * * @param name name of the AtomicReference config * @return the AtomicReference configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1438,7 +1461,8 @@ public AtomicReferenceConfig findAtomicReferenceConfig(String name) { * * @param name name of the AtomicReference config * @return the AtomicReference configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1496,7 +1520,8 @@ public Config setAtomicReferenceConfigs(Map atomi * * @param name name of the CountDownLatch config * @return the CountDownLatch configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1532,7 +1557,8 @@ public CountDownLatchConfig findCountDownLatchConfig(String name) { * * @param name name of the CountDownLatch config * @return the CountDownLatch configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1591,7 +1617,8 @@ public Config setCountDownLatchConfigs(Map countDo * * @param name name of the topic config * @return the topic configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1628,7 +1655,8 @@ public TopicConfig findTopicConfig(String name) { * * @param name name of the topic config * @return the topic configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1660,7 +1688,8 @@ public Config addTopicConfig(TopicConfig topicConfig) { * * @param name name of the reliable topic config * @return the reliable topic configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1698,7 +1727,8 @@ public ReliableTopicConfig findReliableTopicConfig(String name) { * * @param name name of the reliable topic config * @return the reliable topic configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1786,7 +1816,8 @@ public Config setTopicConfigs(Map topicConfigs) { * * @param name name of the executor config * @return the executor configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1811,7 +1842,8 @@ public ExecutorConfig findExecutorConfig(String name) { * * @param name name of the durable executor config * @return the durable executor configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1836,7 +1868,8 @@ public DurableExecutorConfig findDurableExecutorConfig(String name) { * * @param name name of the scheduled executor config * @return the scheduled executor configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1862,7 +1895,8 @@ public ScheduledExecutorConfig findScheduledExecutorConfig(String name) { * * @param name name of the cardinality estimator config * @return the cardinality estimator configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1888,7 +1922,8 @@ public CardinalityEstimatorConfig findCardinalityEstimatorConfig(String name) { * * @param name name of the PN counter config * @return the PN counter configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1925,7 +1960,8 @@ public PNCounterConfig findPNCounterConfig(String name) { * * @param name name of the executor config * @return the executor configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1957,7 +1993,8 @@ public ExecutorConfig getExecutorConfig(String name) { * * @param name name of the durable executor config * @return the durable executor configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -1989,7 +2026,8 @@ public DurableExecutorConfig getDurableExecutorConfig(String name) { * * @param name name of the scheduled executor config * @return the scheduled executor configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -2021,7 +2059,8 @@ public ScheduledExecutorConfig getScheduledExecutorConfig(String name) { * * @param name name of the cardinality estimator config * @return the cardinality estimator configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -2053,7 +2092,8 @@ public CardinalityEstimatorConfig getCardinalityEstimatorConfig(String name) { * * @param name name of the PN counter config * @return the PN counter configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -2280,7 +2320,8 @@ public Config setPNCounterConfigs(Map pnCounterConfigs) * * @param name name of the semaphore config * @return the semaphore configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -2318,7 +2359,8 @@ public SemaphoreConfig findSemaphoreConfig(String name) { * * @param name name of the semaphore config * @return the semaphore configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -2459,7 +2501,8 @@ public Map getQuorumConfigs() { * * @param name name of the split-brain protection config * @return the split-brain protection configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -2479,7 +2522,8 @@ public QuorumConfig getQuorumConfig(String name) { * * @param name name of the split-brain protection config * @return the split-brain protection configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -2650,7 +2694,8 @@ public Map getFlakeIdGeneratorConfigs() { * * @param name name of the flake ID generator config * @return the flake ID generator configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see com.hazelcast.partition.strategy.StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() @@ -2686,7 +2731,8 @@ public FlakeIdGeneratorConfig findFlakeIdGeneratorConfig(String name) { * * @param name name of the flake ID generator config * @return the cache configuration - * @throws ConfigurationException if ambiguous configurations are found + * @throws InvalidConfigurationException if ambiguous configurations are + * found * @see com.hazelcast.partition.strategy.StringPartitioningStrategy#getBaseName(java.lang.String) * @see #setConfigPatternMatcher(ConfigPatternMatcher) * @see #getConfigPatternMatcher() diff --git a/hazelcast/src/main/java/com/hazelcast/config/DomVariableReplacer.java b/hazelcast/src/main/java/com/hazelcast/config/DomVariableReplacer.java index e4665c0b970b..09669ad07cd9 100644 --- a/hazelcast/src/main/java/com/hazelcast/config/DomVariableReplacer.java +++ b/hazelcast/src/main/java/com/hazelcast/config/DomVariableReplacer.java @@ -30,11 +30,12 @@ interface DomVariableReplacer { * * @param node The node in which the variables to be replaced * @param replacer The replacer to be used for replacing the variables - * @param failFast Indicating whether or not a {@link ConfigurationException} - * should be thrown if no replacement found for the - * variables in the node - * - * @throws ConfigurationException if no replacement is found for a variable and {@code failFast} is {@code }true + * @param failFast Indicating whether or not a {@link + * InvalidConfigurationException} should be thrown if no + * replacement found for the variables in the node + * @throws InvalidConfigurationException if no replacement is found for a + * variable and {@code failFast} is + * {@code }true */ void replaceVariables(Node node, ConfigReplacer replacer, boolean failFast); } diff --git a/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigCheckMode.java b/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigCheckMode.java index 532351b62935..c538a448d0ee 100644 --- a/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigCheckMode.java +++ b/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigCheckMode.java @@ -16,13 +16,16 @@ package com.hazelcast.internal.dynamicconfig; +import com.hazelcast.config.InvalidConfigurationException; + /** * Behaviour when detects a configuration conflict while registering a new dynamic configuraiton. * */ public enum ConfigCheckMode { /** - * Throw {@link com.hazelcast.config.ConfigurationException} when a configuration conflict is detected + * Throw {@link InvalidConfigurationException} when a configuration conflict + * is detected * */ THROW_EXCEPTION, diff --git a/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigurationService.java b/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigurationService.java index 79dbb6d939bf..32650a589ec2 100644 --- a/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigurationService.java +++ b/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigurationService.java @@ -24,6 +24,7 @@ import com.hazelcast.config.DurableExecutorConfig; import com.hazelcast.config.ExecutorConfig; import com.hazelcast.config.FlakeIdGeneratorConfig; +import com.hazelcast.config.InvalidConfigurationException; import com.hazelcast.config.ListConfig; import com.hazelcast.config.LockConfig; import com.hazelcast.config.MapConfig; @@ -55,8 +56,9 @@ public interface ConfigurationService { * Registers a dynamic configurations to all cluster members. * * @param config configuration to register - * @throws com.hazelcast.config.ConfigurationException when static configuration already contains the same config - * with the same name + * @throws InvalidConfigurationException when static configuration already + * contains the same config with the + * same name */ void broadcastConfig(IdentifiedDataSerializable config); diff --git a/hazelcast/src/test/java/com/hazelcast/cache/impl/CacheServiceTest.java b/hazelcast/src/test/java/com/hazelcast/cache/impl/CacheServiceTest.java index 91289b8d9433..7f11fc17da51 100644 --- a/hazelcast/src/test/java/com/hazelcast/cache/impl/CacheServiceTest.java +++ b/hazelcast/src/test/java/com/hazelcast/cache/impl/CacheServiceTest.java @@ -148,7 +148,7 @@ public void testPutCacheConfig_whenExceptionThrownFromAdditionalSetup() { try { cacheService.putCacheConfigIfAbsent(newCacheConfig()); // ensure the exception was not swallowed - fail("ConfigurationException should have been thrown"); + fail("InvalidConfigurationException should have been thrown"); } catch (InvalidConfigurationException e) { // assert the CacheConfigFuture was not put in the configs map assertNull(cacheService.getCacheConfig(PREFIXED_CACHE_NAME));