You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2025/09/24 13:16:00 UTC

(commons-geometry) 14/34: pmd fix: use final

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

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git

commit ff40da0692afd4e3a7e0bdec9bb33970bb433734
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Tue Sep 23 17:28:46 2025 +0100

    pmd fix: use final
---
 .../org/apache/commons/geometry/io/core/internal/GeometryIOUtils.java   | 2 +-
 .../org/apache/commons/geometry/io/core/internal/SimpleTextParser.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/commons-geometry-io-core/src/main/java/org/apache/commons/geometry/io/core/internal/GeometryIOUtils.java b/commons-geometry-io-core/src/main/java/org/apache/commons/geometry/io/core/internal/GeometryIOUtils.java
index fdc3f3e7..ada2ceae 100644
--- a/commons-geometry-io-core/src/main/java/org/apache/commons/geometry/io/core/internal/GeometryIOUtils.java
+++ b/commons-geometry-io-core/src/main/java/org/apache/commons/geometry/io/core/internal/GeometryIOUtils.java
@@ -239,7 +239,7 @@ public final class GeometryIOUtils {
     public static <T, C extends Closeable> T tryApplyCloseable(final IOFunction<C, T> function,
             final IOSupplier<? extends C> closeableSupplier) {
         C closeable = null;
-        RuntimeException exc;
+        final RuntimeException exc;
         try {
             closeable = closeableSupplier.get();
             return function.apply(closeable);
diff --git a/commons-geometry-io-core/src/main/java/org/apache/commons/geometry/io/core/internal/SimpleTextParser.java b/commons-geometry-io-core/src/main/java/org/apache/commons/geometry/io/core/internal/SimpleTextParser.java
index ec603b3c..5d6b68c8 100644
--- a/commons-geometry-io-core/src/main/java/org/apache/commons/geometry/io/core/internal/SimpleTextParser.java
+++ b/commons-geometry-io-core/src/main/java/org/apache/commons/geometry/io/core/internal/SimpleTextParser.java
@@ -879,7 +879,7 @@ public class SimpleTextParser {
      */
     public IllegalStateException unexpectedToken(final String expected, final Throwable cause) {
 
-        StringBuilder msg = new StringBuilder(128);
+        final StringBuilder msg = new StringBuilder(128);
         msg.append("expected ")
             .append(expected)
             .append(" but found ")