You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2024/03/27 20:55:10 UTC

(jena) branch main updated: Remove a warning. Tidy EOL white space.

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

andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git


The following commit(s) were added to refs/heads/main by this push:
     new ab3daca6e2 Remove a warning. Tidy EOL white space.
ab3daca6e2 is described below

commit ab3daca6e2cdc16cc060bfbdab7861792434e991
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Wed Mar 27 18:59:32 2024 +0000

    Remove a warning. Tidy EOL white space.
---
 .../jena/arq/querybuilder/handlers/DatasetHandler.java      | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/DatasetHandler.java b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/DatasetHandler.java
index ca90fc2626..b353f11d18 100644
--- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/DatasetHandler.java
+++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/DatasetHandler.java
@@ -81,8 +81,8 @@ public class DatasetHandler implements Handler {
 
     /**
      * Add one or more named graphs to the query.
-     * if {@code graphName} is a {@code collection} or an array each element in the 
-     * @code collection} or array is converted to a string and the result added to the 
+     * if {@code graphName} is a {@code collection} or an array each element in the
+     * @code collection} or array is converted to a string and the result added to the
      * query.
      *
      * @param graphName the name to add.
@@ -100,8 +100,8 @@ public class DatasetHandler implements Handler {
      * @see #asGraphName(Object)
      */
     private void processGraphName(Consumer<String> process, Object graphName) {
-        if (graphName instanceof Iterable) {
-            for (Object o : (Iterable)graphName) {
+        if (graphName instanceof Iterable iterGraphName) {
+            for (Object o : iterGraphName) {
                 process.accept(asGraphName(o));
             }
         } else {
@@ -109,11 +109,10 @@ public class DatasetHandler implements Handler {
         }
     }
 
-
     /**
      * Add one or more graph names to the query.
-     * if {@code graphName} is a {@code collection} or an array each element in the 
-     * @code collection} or array is converted to a string and the result added to the 
+     * if {@code graphName} is a {@code collection} or an array each element in the
+     * @code collection} or array is converted to a string and the result added to the
      * query.
      *
      * @param graphName the name to add.