From 88e7be875752132f7d379ca8a3b8ddefb18822f3 Mon Sep 17 00:00:00 2001 From: TaoZhi Date: Fri, 3 Apr 2020 18:11:47 +0800 Subject: [PATCH] Fix param check of KeyGeneratorConfiguration (#5052) * check whether the type of keyGenerateAlgorithm is null. * add use="required" on attribute column of element key-generator. --- .../yaml/swapper/KeyGeneratorConfigurationYamlSwapper.java | 4 +++- .../src/main/resources/META-INF/namespace/sharding.xsd | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/yaml/swapper/KeyGeneratorConfigurationYamlSwapper.java b/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/yaml/swapper/KeyGeneratorConfigurationYamlSwapper.java index 0a91bdb68a..c49386d0cf 100644 --- a/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/yaml/swapper/KeyGeneratorConfigurationYamlSwapper.java +++ b/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/yaml/swapper/KeyGeneratorConfigurationYamlSwapper.java @@ -17,6 +17,7 @@ package org.apache.shardingsphere.core.yaml.swapper; +import com.google.common.base.Strings; import org.apache.shardingsphere.api.config.sharding.KeyGeneratorConfiguration; import org.apache.shardingsphere.core.yaml.config.sharding.YamlKeyGeneratorConfiguration; import org.apache.shardingsphere.spi.ShardingSphereServiceLoader; @@ -44,7 +45,8 @@ public final class KeyGeneratorConfigurationYamlSwapper implements YamlSwapper - + -- GitLab