diff --git a/infra/expr/core/src/test/java/org/apache/shardingsphere/infra/expr/core/fixture/CustomInlineExpressionParserFixture.java b/infra/expr/core/src/test/java/org/apache/shardingsphere/infra/expr/core/fixture/CustomInlineExpressionParserFixture.java
index 3f0f8d5a59dba..02a6088740cd9 100644
--- a/infra/expr/core/src/test/java/org/apache/shardingsphere/infra/expr/core/fixture/CustomInlineExpressionParserFixture.java
+++ b/infra/expr/core/src/test/java/org/apache/shardingsphere/infra/expr/core/fixture/CustomInlineExpressionParserFixture.java
@@ -29,7 +29,7 @@ public final class CustomInlineExpressionParserFixture implements InlineExpressi
@Override
public void init(final Properties props) {
- this.inlineExpression = props.getProperty(INLINE_EXPRESSION_KEY);
+ inlineExpression = props.getProperty(INLINE_EXPRESSION_KEY);
}
@Override
diff --git a/infra/expr/pom.xml b/infra/expr/pom.xml
index 9f9e4e7cb6486..6b30073cea4e4 100644
--- a/infra/expr/pom.xml
+++ b/infra/expr/pom.xml
@@ -30,8 +30,6 @@
spi
core
- groovy
- purelist
- espresso
+ type
diff --git a/infra/expr/spi/src/main/java/org/apache/shardingsphere/infra/expr/spi/InlineExpressionParser.java b/infra/expr/spi/src/main/java/org/apache/shardingsphere/infra/expr/spi/InlineExpressionParser.java
index 7578f5f8f2d4e..c19b083957e3e 100644
--- a/infra/expr/spi/src/main/java/org/apache/shardingsphere/infra/expr/spi/InlineExpressionParser.java
+++ b/infra/expr/spi/src/main/java/org/apache/shardingsphere/infra/expr/spi/InlineExpressionParser.java
@@ -36,10 +36,9 @@ public interface InlineExpressionParser extends TypedSPI {
/**
* This method is used to return the inlineExpression String itself. In some cases, you may want to do
- * additional processing on inlineExpression to return a specific value, in which case you need to override this
- * method.
+ * additional processing on inlineExpression to return a specific value, in which case you need to override this method.
*
- * @return result processed inline expression defined by the SPI implementation.
+ * @return result processed inline expression defined by the SPI implementation
*/
String handlePlaceHolder();
@@ -54,8 +53,7 @@ public interface InlineExpressionParser extends TypedSPI {
* Evaluate closure.
*
* @return closure
- * @throws UnsupportedOperationException In most cases, users should not implement this method, and the return value
- * of this method can only be a Groovy Closure.
+ * @throws UnsupportedOperationException In most cases, users should not implement this method, and the return value of this method can only be a Groovy closure
*/
default Closure> evaluateClosure() {
throw new UnsupportedOperationException("This SPI implementation does not support the use of this method.");
diff --git a/infra/expr/espresso/pom.xml b/infra/expr/type/espresso/pom.xml
similarity index 95%
rename from infra/expr/espresso/pom.xml
rename to infra/expr/type/espresso/pom.xml
index df7c6fc1cfbda..df2cf432cd1e8 100644
--- a/infra/expr/espresso/pom.xml
+++ b/infra/expr/type/espresso/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.apache.shardingsphere
- shardingsphere-infra-expr
+ shardingsphere-infra-expr-type
5.4.1-SNAPSHOT
shardingsphere-infra-expr-espresso
@@ -85,7 +85,7 @@
true
- ${project.build.outputDirectory}/espresso-need-libs
+ target/classes/espresso-need-libs
diff --git a/infra/expr/espresso/src/main/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParser.java b/infra/expr/type/espresso/src/main/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParser.java
similarity index 96%
rename from infra/expr/espresso/src/main/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParser.java
rename to infra/expr/type/espresso/src/main/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParser.java
index 8e9b33fc3ad7f..0e1839b4f3673 100644
--- a/infra/expr/espresso/src/main/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParser.java
+++ b/infra/expr/type/espresso/src/main/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParser.java
@@ -52,15 +52,9 @@ public final class EspressoInlineExpressionParser implements InlineExpressionPar
JAVA_CLASSPATH = dir + File.separator + "groovy.jar";
}
- /**
- * Initialize SPI.
- *
- * @param props A Properties instance that carries inlineExpression.
- * And for compatibility reasons, inlineExpression allows to be null.
- */
@Override
public void init(final Properties props) {
- this.inlineExpression = props.getProperty(INLINE_EXPRESSION_KEY);
+ inlineExpression = props.getProperty(INLINE_EXPRESSION_KEY);
}
@Override
diff --git a/infra/expr/espresso/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser b/infra/expr/type/espresso/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
similarity index 100%
rename from infra/expr/espresso/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
rename to infra/expr/type/espresso/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
diff --git a/infra/expr/espresso/src/test/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParserTest.java b/infra/expr/type/espresso/src/test/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParserTest.java
similarity index 100%
rename from infra/expr/espresso/src/test/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParserTest.java
rename to infra/expr/type/espresso/src/test/java/org/apache/shardingsphere/infra/expr/espresso/EspressoInlineExpressionParserTest.java
diff --git a/infra/expr/groovy/pom.xml b/infra/expr/type/groovy/pom.xml
similarity index 96%
rename from infra/expr/groovy/pom.xml
rename to infra/expr/type/groovy/pom.xml
index cbc18ed0bed35..4591658174e65 100644
--- a/infra/expr/groovy/pom.xml
+++ b/infra/expr/type/groovy/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.apache.shardingsphere
- shardingsphere-infra-expr
+ shardingsphere-infra-expr-type
5.4.1-SNAPSHOT
shardingsphere-infra-expr-groovy
diff --git a/infra/expr/groovy/src/main/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParser.java b/infra/expr/type/groovy/src/main/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParser.java
similarity index 96%
rename from infra/expr/groovy/src/main/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParser.java
rename to infra/expr/type/groovy/src/main/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParser.java
index 27411402be02a..92eb078a3c4c5 100644
--- a/infra/expr/groovy/src/main/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParser.java
+++ b/infra/expr/type/groovy/src/main/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParser.java
@@ -51,15 +51,9 @@ public final class GroovyInlineExpressionParser implements InlineExpressionParse
private String inlineExpression;
- /**
- * Initialize SPI.
- *
- * @param props A Properties instance that carries inlineExpression.
- * And for compatibility reasons, inlineExpression allows to be null.
- */
@Override
public void init(final Properties props) {
- this.inlineExpression = props.getProperty(INLINE_EXPRESSION_KEY);
+ inlineExpression = props.getProperty(INLINE_EXPRESSION_KEY);
}
@Override
diff --git a/infra/expr/groovy/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser b/infra/expr/type/groovy/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
similarity index 100%
rename from infra/expr/groovy/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
rename to infra/expr/type/groovy/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
diff --git a/infra/expr/groovy/src/test/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParserTest.java b/infra/expr/type/groovy/src/test/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParserTest.java
similarity index 100%
rename from infra/expr/groovy/src/test/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParserTest.java
rename to infra/expr/type/groovy/src/test/java/org/apache/shardingsphere/infra/expr/groovy/GroovyInlineExpressionParserTest.java
diff --git a/infra/expr/type/pom.xml b/infra/expr/type/pom.xml
new file mode 100644
index 0000000000000..12131f0ae98db
--- /dev/null
+++ b/infra/expr/type/pom.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.shardingsphere
+ shardingsphere-infra-expr
+ 5.4.1-SNAPSHOT
+
+ shardingsphere-infra-expr-type
+ pom
+ ${project.artifactId}
+
+
+ groovy
+ purelist
+ espresso
+
+
diff --git a/infra/expr/purelist/pom.xml b/infra/expr/type/purelist/pom.xml
similarity index 96%
rename from infra/expr/purelist/pom.xml
rename to infra/expr/type/purelist/pom.xml
index 0e3d95b390bff..0ac0438b150c7 100644
--- a/infra/expr/purelist/pom.xml
+++ b/infra/expr/type/purelist/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.apache.shardingsphere
- shardingsphere-infra-expr
+ shardingsphere-infra-expr-type
5.4.1-SNAPSHOT
shardingsphere-infra-expr-purelist
diff --git a/infra/expr/purelist/src/main/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParser.java b/infra/expr/type/purelist/src/main/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParser.java
similarity index 88%
rename from infra/expr/purelist/src/main/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParser.java
rename to infra/expr/type/purelist/src/main/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParser.java
index ab1d3a34af286..f84e5a7fee13a 100644
--- a/infra/expr/purelist/src/main/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParser.java
+++ b/infra/expr/type/purelist/src/main/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParser.java
@@ -34,15 +34,9 @@ public final class PureListInlineExpressionParser implements InlineExpressionPar
private String inlineExpression;
- /**
- * Initialize SPI.
- *
- * @param props A Properties instance that carries inlineExpression.
- * And for compatibility reasons, inlineExpression allows to be null.
- */
@Override
public void init(final Properties props) {
- this.inlineExpression = props.getProperty(INLINE_EXPRESSION_KEY);
+ inlineExpression = props.getProperty(INLINE_EXPRESSION_KEY);
}
@Override
@@ -60,7 +54,7 @@ private List split(final String inlineExpression) {
StringBuilder segment = new StringBuilder();
for (int i = 0; i < inlineExpression.length(); i++) {
char each = inlineExpression.charAt(i);
- if (each == SPLITTER) {
+ if (SPLITTER == each) {
result.add(segment.toString().trim());
segment.setLength(0);
} else {
diff --git a/infra/expr/purelist/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser b/infra/expr/type/purelist/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
similarity index 100%
rename from infra/expr/purelist/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
rename to infra/expr/type/purelist/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.expr.spi.InlineExpressionParser
diff --git a/infra/expr/purelist/src/test/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParserTest.java b/infra/expr/type/purelist/src/test/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParserTest.java
similarity index 100%
rename from infra/expr/purelist/src/test/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParserTest.java
rename to infra/expr/type/purelist/src/test/java/org/apache/shardingsphere/infra/expr/purelist/PureListInlineExpressionParserTest.java