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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/DelegateRegionScanner.java b/phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/DelegateRegionScanner.java
index 3d742431914..3d562d57619 100644
--- a/phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/DelegateRegionScanner.java
+++ b/phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/DelegateRegionScanner.java
@@ -14,7 +14,8 @@
* 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.phoenix.coprocessor;
+ */
+package org.apache.phoenix.coprocessor;
import java.io.IOException;
import java.util.List;
diff --git a/pom.xml b/pom.xml
index 29786ee7bba..36baee073fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -168,6 +168,7 @@
3.3.0
3.6.0
2.5.2.Final
+ 2.30.0
false
@@ -700,6 +701,119 @@
true
true
+
+ com.diffplug.spotless
+ spotless-maven-plugin
+ ${spotless.version}
+
+
+
+
+ **/generated/*
+ **/package-info.java
+
+
+
+ Remove unhelpful javadoc stubs
+ (?m)^ *\* *@(?:param|throws|return) *\w* *\n
+
+
+
+
+ Purge single returns tag multi line
+ (?m)^ */\*\*\n *\* *@return *(.*) *\n *\*/$
+ /** Returns $1 */
+
+
+ Purge single returns tag single line
+ ^ */\*\* *@return *(.*) *\*/$
+ /** Returns $1 */
+
+
+
+ ${session.executionRootDirectory}/dev/PhoenixCodeTemplate.xml
+
+
+ ${session.executionRootDirectory}/dev/phoenix.importorder
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+ **/*.xml
+ **/*.sh
+ **/*.py
+ **/Jenkinsfile*
+ **/Dockerfile*
+ **/*.md
+ *.md
+ **/*.txt
+ *.txt
+
+
+ **/target/**
+ **/dependency-reduced-pom.xml
+
+
+
+
+
+
+
+
+ src/main/java/**/*.java
+ src/test/java/**/*.java
+
+
+ **/generated/*
+ **/package-info.java
+
+
+ ${session.executionRootDirectory}/src/main/config/checkstyle/header.txt
+ package
+
+
+
+
+
+ false
+
+
+
diff --git a/src/main/config/checkstyle/header.txt b/src/main/config/checkstyle/header.txt
index 2a4297155ea..d5519133edc 100644
--- a/src/main/config/checkstyle/header.txt
+++ b/src/main/config/checkstyle/header.txt
@@ -1,16 +1,17 @@
/*
- * 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
+ * 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
+ * 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.
- */
+ */
\ No newline at end of file