You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2024/08/24 08:35:15 UTC
(shardingsphere) branch master updated: Remove useless pipeline util class (#32653)
This is an automated email from the ASF dual-hosted git repository.
zhaojinchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 18fe218fb8b Remove useless pipeline util class (#32653)
18fe218fb8b is described below
commit 18fe218fb8b064c04292aeb045dd9fe61173cfcf
Author: Hongsheng Zhong <zh...@apache.org>
AuthorDate: Sat Aug 24 16:35:09 2024 +0800
Remove useless pipeline util class (#32653)
---
.../pipeline/core/util/PipelineStringUtils.java | 58 ----------------------
.../core/util/PipelineStringUtilsTest.java | 40 ---------------
2 files changed, 98 deletions(-)
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/util/PipelineStringUtils.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/util/PipelineStringUtils.java
deleted file mode 100644
index 722e775005a..00000000000
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/util/PipelineStringUtils.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.data.pipeline.core.util;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-/**
- * Pipeline string utils.
- */
-@NoArgsConstructor(access = AccessLevel.NONE)
-public final class PipelineStringUtils {
-
- /**
- * Equals ignore case.
- *
- * @param one one
- * @param another another
- * @return is equals ignore case
- */
- public static boolean equalsIgnoreCase(final Collection<String> one, final Collection<String> another) {
- if (null == one && null == another) {
- return true;
- }
- if (null == one || null == another) {
- return false;
- }
- if (one.size() != another.size()) {
- return false;
- }
- Iterator<String> oneIterator = one.iterator();
- Iterator<String> anotherIterator = another.iterator();
- while (oneIterator.hasNext() && anotherIterator.hasNext()) {
- if (!oneIterator.next().equalsIgnoreCase(anotherIterator.next())) {
- return false;
- }
- }
- return true;
- }
-}
diff --git a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/util/PipelineStringUtilsTest.java b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/util/PipelineStringUtilsTest.java
deleted file mode 100644
index f3aa877350f..00000000000
--- a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/util/PipelineStringUtilsTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.data.pipeline.core.util;
-
-import org.junit.jupiter.api.Test;
-
-import java.util.Collections;
-
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-class PipelineStringUtilsTest {
-
- @Test
- void assertEqualsIgnoreCase() {
- assertTrue(PipelineStringUtils.equalsIgnoreCase(null, null));
- assertFalse(PipelineStringUtils.equalsIgnoreCase(null, Collections.emptyList()));
- assertFalse(PipelineStringUtils.equalsIgnoreCase(Collections.emptyList(), null));
- assertFalse(PipelineStringUtils.equalsIgnoreCase(Collections.singletonList("test"), Collections.emptyList()));
- assertFalse(PipelineStringUtils.equalsIgnoreCase(Collections.emptyList(), Collections.singletonList("test")));
- assertTrue(PipelineStringUtils.equalsIgnoreCase(Collections.singletonList("test"), Collections.singletonList("test")));
- assertTrue(PipelineStringUtils.equalsIgnoreCase(Collections.singletonList("TEST"), Collections.singletonList("test")));
- assertTrue(PipelineStringUtils.equalsIgnoreCase(Collections.singletonList("test"), Collections.singletonList("TEST")));
- }
-}