So the code format check failed. I cannot see anything wrong with the changes I 
made.

https://github.com/apache/db-jdo/actions/runs/4591159720/jobs/8107138939?pr=73

Error:  To fix formatting errors, run "mvn 
com.spotify.fmt:fmt-maven-plugin:format"
8275
 
<https://github.com/apache/db-jdo/actions/runs/4591159720/jobs/8107138939?pr=73#step:3:8276>Error:
  Non complying file: 
/home/runner/work/db-jdo/db-jdo/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
While I try to figure out how to run com.spotify.fmt could anyone just tell me 
what the problem is?

Thanks,
Craig

> Begin forwarded message:
> 
> From: c...@apache.org
> Subject: [db-jdo] 01/01: Update PropertyUtils.java
> Date: April 2, 2023 at 15:28:40 PDT
> To: "jdo-comm...@db.apache.org" <jdo-comm...@db.apache.org>
> Reply-To: jdo-dev@db.apache.org
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> clr pushed a commit to branch clr-apache-array-copy
> in repository https://gitbox.apache.org/repos/asf/db-jdo.git
> 
> commit 034060cb69ad0a10f9bdf5aca4d5a0c9c9c11e8c
> Author: Craig L Russell <apache....@gmail.com>
> AuthorDate: Sun Apr 2 15:28:34 2023 -0700
> 
>    Update PropertyUtils.java
> 
>    JDO-819 Fix code smells
>    Use "Arrays.copyOf", "Arrays.asList", "Collections.addAll" or 
> "System.arraycopy" instead.
> ---
> .../java/org/apache/jdo/exectck/PropertyUtils.java | 23 ++++++++++------------
> 1 file changed, 10 insertions(+), 13 deletions(-)
> 
> diff --git a/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java 
> b/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
> index 07473bce..eef6d73c 100644
> --- a/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
> +++ b/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
> @@ -16,6 +16,7 @@ package org.apache.jdo.exectck;
> import java.io.File;
> import java.io.FileInputStream;
> import java.io.IOException;
> +import java.util.Arrays;
> import java.util.Collection;
> import java.util.List;
> import java.util.Properties;
> @@ -28,31 +29,27 @@ public class PropertyUtils {
>   }
> 
>   /**
> -   * Separates white space separated items from a String into Collection 
> entries Used to collect
> -   * command line argument lists into a Collection
> +   * Separates white space separated items from a String into a Set
> +   * Used to collect command line arguments
>    *
>    * @param names String of white space separated items
> -   * @param list HashSet to contain String items
> +   * @param set Set to contain String items
>    */
> -  public static void string2Set(String names, Collection<String> list) {
> +  public static void string2Set(String names, Collection<String> set) {
>     String[] items = names.split("[ \t\n]");
> -    for (String s : items) {
> -      list.add(s);
> -    }
> +    set.addAll(Arrays.asList(items));
>   }
> 
>   /**
> -   * Separates white space separated items from a String into HashSet 
> entries Used to collect
> -   * command line argument lists into a Collection
> +   * Separates white space separated items from a String into a List
> +   * Used to collect command line arguments
>    *
>    * @param names String of white space separated items
> -   * @param list HashSet to contain String items
> +   * @param list List to contain String items
>    */
>   public static void string2List(String names, List<String> list) {
>     String[] items = names.split("[ \t\n]");
> -    for (String s : items) {
> -      list.add(s);
> -    }
> +    list.addAll(Arrays.asList(items));
>   }
> 
>   /**
> 

Craig L Russell
c...@apache.org

Reply via email to