This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git

commit 14522c1f599eb7da191f2f49c28380e44b451f41
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Tue Nov 17 05:47:01 2026 +0000

    Replace remaining StringUtils and Commons calls with the JDK
---
 .../plugins/checkstyle/exec/DefaultCheckstyleExecutor.java | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
 
b/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
index 08f28f5..837d711 100644
--- 
a/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
+++ 
b/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
@@ -284,11 +284,12 @@ public class DefaultCheckstyleExecutor implements 
CheckstyleExecutor {
             }
             Configuration config = ConfigurationLoader.loadConfiguration(
                     configFile, new PropertiesExpander(overridingProperties), 
omitIgnoredModules);
-            String effectiveEncoding = 
StringUtils.isNotEmpty(request.getEncoding())
-                    ? request.getEncoding()
-                    : System.getProperty("file.encoding", "UTF-8");
+            String effectiveEncoding =
+                    request.getEncoding() != null && 
!request.getEncoding().isEmpty()
+                            ? request.getEncoding()
+                            : System.getProperty("file.encoding", "UTF-8");
 
-            if (StringUtils.isEmpty(request.getEncoding())) {
+            if (request.getEncoding() == null || 
request.getEncoding().isEmpty()) {
                 logger.warn("File encoding has not been set, using platform 
encoding " + effectiveEncoding
                         + ", i.e. build is platform dependent!");
             }
@@ -384,7 +385,8 @@ public class DefaultCheckstyleExecutor implements 
CheckstyleExecutor {
                 }
             }
 
-            if (StringUtils.isNotEmpty(request.getPropertyExpansion())) {
+            if (request.getPropertyExpansion() != null
+                    && !request.getPropertyExpansion().isEmpty()) {
                 String propertyExpansion = request.getPropertyExpansion();
                 // Convert \ to \\, so that p.load will convert it back 
properly
                 propertyExpansion = propertyExpansion.replace("\\", "\\\\");
@@ -438,7 +440,7 @@ public class DefaultCheckstyleExecutor implements 
CheckstyleExecutor {
     private List<File> getFilesToProcess(CheckstyleExecutorRequest request) 
throws IOException {
         StringBuilder excludesStr = new StringBuilder();
 
-        if (StringUtils.isNotEmpty(request.getExcludes())) {
+        if (request.getExcludes() != null && !request.getExcludes().isEmpty()) 
{
             excludesStr.append(request.getExcludes());
         }
 

Reply via email to