You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/12/29 16:00:04 UTC
(commons-bcel) 01/07: Add Checkstyle ImportOrder
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
commit 3aeb4211e0de2f9cadd9a73160927f508fef9c66
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Dec 29 10:19:54 2024 -0500
Add Checkstyle ImportOrder
---
src/conf/checkstyle/checkstyle.xml | 6 ++++++
.../apache/bcel/verifier/structurals/InstConstraintVisitor.java | 7 ++++---
.../org/apache/bcel/verifier/statics/Pass3aVerifierTestCase.java | 1 -
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/conf/checkstyle/checkstyle.xml b/src/conf/checkstyle/checkstyle.xml
index 6c5ec826..9199cdfa 100644
--- a/src/conf/checkstyle/checkstyle.xml
+++ b/src/conf/checkstyle/checkstyle.xml
@@ -62,6 +62,12 @@ limitations under the License.
<module name="FinalLocalVariable" />
<module name="IllegalImport" />
<module name="IllegalInstantiation" />
+ <module name="ImportOrder">
+ <property name="option" value="top" />
+ <property name="groups" value="java,javax,org" />
+ <property name="ordered" value="true" />
+ <property name="separated" value="true" />
+ </module>
<module name="ModifierOrder" />
<module name="MultipleVariableDeclarations" />
<module name="NeedBraces" />
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java b/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
index 0644eb62..73cdca6b 100644
--- a/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
+++ b/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
@@ -31,15 +31,16 @@ import org.apache.bcel.classfile.ConstantLong;
import org.apache.bcel.classfile.ConstantString;
import org.apache.bcel.classfile.Field;
import org.apache.bcel.classfile.JavaClass;
-//CHECKSTYLE:OFF (there are lots of references!)
-import org.apache.bcel.generic.*;
-//CHECKSTYLE:ON
import org.apache.bcel.verifier.VerificationResult;
import org.apache.bcel.verifier.Verifier;
import org.apache.bcel.verifier.VerifierFactory;
import org.apache.bcel.verifier.exc.AssertionViolatedException;
import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
+//CHECKSTYLE:OFF (there are lots of references!)
+import org.apache.bcel.generic.*;
+//CHECKSTYLE:ON
+
/**
* A Visitor class testing for valid preconditions of JVM instructions. The instance of this class will throw a
* StructuralCodeConstraintException instance if an instruction is visitXXX()ed which has preconditions that are not
diff --git a/src/test/java/org/apache/bcel/verifier/statics/Pass3aVerifierTestCase.java b/src/test/java/org/apache/bcel/verifier/statics/Pass3aVerifierTestCase.java
index db7d2cf2..6bb6e4c0 100644
--- a/src/test/java/org/apache/bcel/verifier/statics/Pass3aVerifierTestCase.java
+++ b/src/test/java/org/apache/bcel/verifier/statics/Pass3aVerifierTestCase.java
@@ -20,7 +20,6 @@ package org.apache.bcel.verifier.statics;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
-
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;