You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ki...@apache.org on 2022/01/17 03:32:24 UTC
[incubator-seatunnel] branch dev updated: [SeaTunnel#1071] Enable the InnerTypeLast rule in checkstyle and fix it (#1072)
This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 059f956 [SeaTunnel#1071] Enable the InnerTypeLast rule in checkstyle and fix it (#1072)
059f956 is described below
commit 059f9561acf3fd022fcd88147d03b756ca4f18a0
Author: Benedict Jin <as...@apache.org>
AuthorDate: Mon Jan 17 11:32:19 2022 +0800
[SeaTunnel#1071] Enable the InnerTypeLast rule in checkstyle and fix it (#1072)
---
.../java/com/typesafe/config/impl/PathParser.java | 31 +++++++++++-----------
tools/checkstyle/checkStyle.xml | 1 +
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/seatunnel-config/src/main/java/com/typesafe/config/impl/PathParser.java b/seatunnel-config/src/main/java/com/typesafe/config/impl/PathParser.java
index d55c363..bf867f3 100644
--- a/seatunnel-config/src/main/java/com/typesafe/config/impl/PathParser.java
+++ b/seatunnel-config/src/main/java/com/typesafe/config/impl/PathParser.java
@@ -31,21 +31,6 @@ import java.util.Iterator;
import java.util.List;
final class PathParser {
- static class Element {
- StringBuilder sb;
- // an element can be empty if it has a quoted empty string "" in it
- boolean canBeEmpty;
-
- Element(String initial, boolean canBeEmpty) {
- this.canBeEmpty = canBeEmpty;
- this.sb = new StringBuilder(initial);
- }
-
- @Override
- public String toString() {
- return "Element(" + sb.toString() + "," + canBeEmpty + ")";
- }
- }
static ConfigOrigin API_ORIGIN = SimpleConfigOrigin.newSimple("path parameter");
@@ -305,4 +290,20 @@ final class PathParser {
return fastPathBuild(null, s, s.length());
}
+
+ static class Element {
+ StringBuilder sb;
+ // an element can be empty if it has a quoted empty string "" in it
+ boolean canBeEmpty;
+
+ Element(String initial, boolean canBeEmpty) {
+ this.canBeEmpty = canBeEmpty;
+ this.sb = new StringBuilder(initial);
+ }
+
+ @Override
+ public String toString() {
+ return "Element(" + sb.toString() + "," + canBeEmpty + ")";
+ }
+ }
}
diff --git a/tools/checkstyle/checkStyle.xml b/tools/checkstyle/checkStyle.xml
index e3b9cf6..fcd3574 100755
--- a/tools/checkstyle/checkStyle.xml
+++ b/tools/checkstyle/checkStyle.xml
@@ -173,6 +173,7 @@
<property name="severity" value="error"/>
</module>
+ <module name="InnerTypeLast"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format"