You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/09 12:17:14 UTC

[GitHub] [shardingsphere] zzzwjZhang opened a new pull request, #22776: add KEEP_FIRST_N_LAST_M mask algorithm

zzzwjZhang opened a new pull request, #22776:
URL: https://github.com/apache/shardingsphere/pull/22776

   Fixes #ISSUSE_ID.
   
   Changes proposed in this pull request:
     -
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongduanmu merged pull request #22776: add cover mask algorithm

Posted by GitBox <gi...@apache.org>.
strongduanmu merged PR #22776:
URL: https://github.com/apache/shardingsphere/pull/22776


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] codecov-commenter commented on pull request #22776: add KEEP_FIRST_N_LAST_M mask algorithm

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #22776:
URL: https://github.com/apache/shardingsphere/pull/22776#issuecomment-1344285167

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/22776?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#22776](https://codecov.io/gh/apache/shardingsphere/pull/22776?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (006a5bf) into [master](https://codecov.io/gh/apache/shardingsphere/commit/57ff825cbe27689c823d54e721c98ff4db8042e3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (57ff825) will **increase** coverage by `0.01%`.
   > The diff coverage is `89.47%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #22776      +/-   ##
   ============================================
   + Coverage     49.28%   49.29%   +0.01%     
     Complexity     2447     2447              
   ============================================
     Files          4125     4126       +1     
     Lines         57706    57726      +20     
     Branches       9883     9884       +1     
   ============================================
   + Hits          28439    28456      +17     
   - Misses        26818    26820       +2     
   - Partials       2449     2450       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/22776?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../algorithm/cover/KeepFirstNLastMMaskAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/22776/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmVhdHVyZXMvbWFzay9jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tYXNrL2FsZ29yaXRobS9jb3Zlci9LZWVwRmlyc3ROTGFzdE1NYXNrQWxnb3JpdGhtLmphdmE=) | `89.47% <89.47%> (ø)` | |
   | [...ngsphere/mask/algorithm/hash/MD5MaskAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/22776/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmVhdHVyZXMvbWFzay9jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tYXNrL2FsZ29yaXRobS9oYXNoL01ENU1hc2tBbGdvcml0aG0uamF2YQ==) | `0.00% <0.00%> (ø)` | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zzzwjZhang closed pull request #22776: add KEEP_FIRST_N_LAST_M mask algorithm

Posted by GitBox <gi...@apache.org>.
zzzwjZhang closed pull request #22776: add KEEP_FIRST_N_LAST_M mask algorithm
URL: https://github.com/apache/shardingsphere/pull/22776


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #22776: add KEEP_FIRST_N_LAST_M mask algorithm

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #22776:
URL: https://github.com/apache/shardingsphere/pull/22776#discussion_r1044949798


##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/KeepFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.mask.algorithm;
+
+import org.apache.shardingsphere.mask.algorithm.cover.KeepFirstNLastMMaskAlgorithm;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+
+/**
+ * KEEP_FIRST_N_LAST_M test.
+ */
+public class KeepFirstNLastMMaskAlgorithmTest {
+    
+    private KeepFirstNLastMMaskAlgorithm keepFirstNLastMMaskAlgorithm;
+    
+    @Before
+    public void setUp() {
+        keepFirstNLastMMaskAlgorithm = new KeepFirstNLastMMaskAlgorithm();
+        keepFirstNLastMMaskAlgorithm.init(initProperties());
+    }
+    
+    private Properties initProperties() {
+        Properties properties = new Properties();
+        properties.setProperty("start-index", "2");
+        properties.setProperty("stop-index", "5");
+        properties.setProperty("replace-char", "*");
+        return properties;
+    }
+    
+    @Test
+    public void testMask() {
+        String result = keepFirstNLastMMaskAlgorithm.mask("abc123456");
+        assertEquals("ab*23456", result);
+    }
+    
+    @Test
+    public void testMaskIfPlainValueIsLess() {
+        String result = keepFirstNLastMMaskAlgorithm.mask("abc");
+        assertEquals("abc", result);

Review Comment:
   Don't worry, I'm sure you'll do a great job.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #22776: add KEEP_FIRST_N_LAST_M mask algorithm

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #22776:
URL: https://github.com/apache/shardingsphere/pull/22776#discussion_r1044938931


##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/KeepFirstNLastMMaskAlgorithm.java:
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.mask.algorithm.cover;
+
+import com.google.common.base.Preconditions;
+import lombok.Getter;
+import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
+
+import java.util.Optional;
+import java.util.Properties;
+
+/**
+ * KEEP_FIRST_N_LAST_M Algorithm.
+ */
+public class KeepFirstNLastMMaskAlgorithm implements MaskAlgorithm<Object, String> {
+    
+    private static final String START_INDEX = "start-index";

Review Comment:
   Can you modify the props to `n` and `m`? Just keep same with algorithm name.



##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/KeepFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.mask.algorithm;
+
+import org.apache.shardingsphere.mask.algorithm.cover.KeepFirstNLastMMaskAlgorithm;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+
+/**
+ * KEEP_FIRST_N_LAST_M test.
+ */
+public class KeepFirstNLastMMaskAlgorithmTest {
+    
+    private KeepFirstNLastMMaskAlgorithm keepFirstNLastMMaskAlgorithm;
+    
+    @Before
+    public void setUp() {
+        keepFirstNLastMMaskAlgorithm = new KeepFirstNLastMMaskAlgorithm();
+        keepFirstNLastMMaskAlgorithm.init(initProperties());
+    }
+    
+    private Properties initProperties() {
+        Properties properties = new Properties();
+        properties.setProperty("start-index", "2");
+        properties.setProperty("stop-index", "5");
+        properties.setProperty("replace-char", "*");
+        return properties;
+    }
+    
+    @Test
+    public void testMask() {
+        String result = keepFirstNLastMMaskAlgorithm.mask("abc123456");
+        assertEquals("ab*23456", result);
+    }
+    
+    @Test
+    public void testMaskIfPlainValueIsLess() {
+        String result = keepFirstNLastMMaskAlgorithm.mask("abc");
+        assertEquals("abc", result);
+    }
+    
+    @Test
+    public void testNotSetStartIndex() {
+        KeepFirstNLastMMaskAlgorithm keepFirstNLastMMaskAlgorithm1 = new KeepFirstNLastMMaskAlgorithm();
+        Properties wrongProperties = new Properties();
+        wrongProperties.setProperty("stop-index", "5");
+        wrongProperties.setProperty("replace-char", "*");
+        assertThrows(IllegalArgumentException.class, () -> {
+            keepFirstNLastMMaskAlgorithm1.init(wrongProperties);
+        });
+    }
+    

Review Comment:
   Please remove this useless blank line.



##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/KeepFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.mask.algorithm;
+
+import org.apache.shardingsphere.mask.algorithm.cover.KeepFirstNLastMMaskAlgorithm;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+
+/**
+ * KEEP_FIRST_N_LAST_M test.
+ */
+public class KeepFirstNLastMMaskAlgorithmTest {
+    
+    private KeepFirstNLastMMaskAlgorithm keepFirstNLastMMaskAlgorithm;
+    
+    @Before
+    public void setUp() {
+        keepFirstNLastMMaskAlgorithm = new KeepFirstNLastMMaskAlgorithm();
+        keepFirstNLastMMaskAlgorithm.init(initProperties());
+    }
+    
+    private Properties initProperties() {
+        Properties properties = new Properties();
+        properties.setProperty("start-index", "2");
+        properties.setProperty("stop-index", "5");
+        properties.setProperty("replace-char", "*");
+        return properties;

Review Comment:
   Please rename properties to result.



##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/KeepFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.mask.algorithm;
+
+import org.apache.shardingsphere.mask.algorithm.cover.KeepFirstNLastMMaskAlgorithm;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+
+/**
+ * KEEP_FIRST_N_LAST_M test.
+ */
+public class KeepFirstNLastMMaskAlgorithmTest {
+    
+    private KeepFirstNLastMMaskAlgorithm keepFirstNLastMMaskAlgorithm;
+    
+    @Before
+    public void setUp() {
+        keepFirstNLastMMaskAlgorithm = new KeepFirstNLastMMaskAlgorithm();
+        keepFirstNLastMMaskAlgorithm.init(initProperties());
+    }
+    
+    private Properties initProperties() {
+        Properties properties = new Properties();
+        properties.setProperty("start-index", "2");
+        properties.setProperty("stop-index", "5");
+        properties.setProperty("replace-char", "*");
+        return properties;
+    }
+    
+    @Test
+    public void testMask() {
+        String result = keepFirstNLastMMaskAlgorithm.mask("abc123456");
+        assertEquals("ab*23456", result);
+    }
+    
+    @Test
+    public void testMaskIfPlainValueIsLess() {
+        String result = keepFirstNLastMMaskAlgorithm.mask("abc");
+        assertEquals("abc", result);

Review Comment:
   Hi @zzzwjZhang, you can read ShardingSphere code conduct first - https://shardingsphere.apache.org/community/en/involved/conduct/code/. We recommend using assertThat over assertEquals.



##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/KeepFirstNLastMMaskAlgorithm.java:
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.mask.algorithm.cover;
+
+import com.google.common.base.Preconditions;
+import lombok.Getter;
+import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
+
+import java.util.Optional;
+import java.util.Properties;
+
+/**
+ * KEEP_FIRST_N_LAST_M Algorithm.
+ */
+public class KeepFirstNLastMMaskAlgorithm implements MaskAlgorithm<Object, String> {

Review Comment:
   Please add final for KeepFirstNLastMMaskAlgorithm.



##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/KeepFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.mask.algorithm;
+
+import org.apache.shardingsphere.mask.algorithm.cover.KeepFirstNLastMMaskAlgorithm;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+
+/**
+ * KEEP_FIRST_N_LAST_M test.
+ */
+public class KeepFirstNLastMMaskAlgorithmTest {

Review Comment:
   Please add final for KeepFirstNLastMMaskAlgorithmTest.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zzzwjZhang commented on a diff in pull request #22776: add KEEP_FIRST_N_LAST_M mask algorithm

Posted by GitBox <gi...@apache.org>.
zzzwjZhang commented on code in PR #22776:
URL: https://github.com/apache/shardingsphere/pull/22776#discussion_r1044949372


##########
features/mask/core/src/test/java/org/apache/shardingsphere/mask/algorithm/KeepFirstNLastMMaskAlgorithmTest.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.mask.algorithm;
+
+import org.apache.shardingsphere.mask.algorithm.cover.KeepFirstNLastMMaskAlgorithm;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+
+/**
+ * KEEP_FIRST_N_LAST_M test.
+ */
+public class KeepFirstNLastMMaskAlgorithmTest {
+    
+    private KeepFirstNLastMMaskAlgorithm keepFirstNLastMMaskAlgorithm;
+    
+    @Before
+    public void setUp() {
+        keepFirstNLastMMaskAlgorithm = new KeepFirstNLastMMaskAlgorithm();
+        keepFirstNLastMMaskAlgorithm.init(initProperties());
+    }
+    
+    private Properties initProperties() {
+        Properties properties = new Properties();
+        properties.setProperty("start-index", "2");
+        properties.setProperty("stop-index", "5");
+        properties.setProperty("replace-char", "*");
+        return properties;
+    }
+    
+    @Test
+    public void testMask() {
+        String result = keepFirstNLastMMaskAlgorithm.mask("abc123456");
+        assertEquals("ab*23456", result);
+    }
+    
+    @Test
+    public void testMaskIfPlainValueIsLess() {
+        String result = keepFirstNLastMMaskAlgorithm.mask("abc");
+        assertEquals("abc", result);

Review Comment:
   sorry,i will be careful next time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org