Hi Tobias,

Thanks for the hint. I changed the javadoc for the two methods and tried again.

The error message wasn't helpful but I ran mvn locally and now get:

org.apache.maven.enforcer.rule.api.EnforcerRuleException: Detected JDK Version: 
1.8.0-331 is not in the allowed range [11,).
    
I have 1.8.361 installed according to the Java control panel (last updated 
today).
But my env has
JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_331.jdk/Contents/Home

I looked in my /Library/Java/JavaVirtualMachines and there is only the one VM 
installed there.

But that's just on my local machine. What is the problem with the GitHub runner?

I also found this from stackOverflow:

 clr% /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    1.8.361.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet 
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_331 (x86_64) "Oracle Corporation" - "Java SE 8" 
/Library/Java/JavaVirtualMachines/jdk1.8.0_331.jdk/Contents/Home
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

Any ideas?
Thanks,
Craig

> On Apr 3, 2023, at 14:17, Tobias Bouschen 
> <tobias.bousc...@googlemail.com.INVALID> wrote:
> 
> Hi Craig,
> 
> the instructions on how to run the format jobs are given in the readme: 
> https://github.com/apache/db-jdo#formatting-using-maven
> 
> GJF also formats javadoc. So my guess would be that the new javadoc is not 
> formatted correctly. The issue is probably that the javadoc has a linebreak 
> even though the character limit is not reached on the first line. If you want 
> the second line to actually be printed as a second line in the javadoc, you 
> have to add '<p>' between the two lines. If you just add a blank line between 
> the two javadoc lines, the formatter should do this for you.
> 
> Best regards,
> Tobias
> 
> On 03/04/2023 22:25, Craig Russell wrote:
>> 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
>> 
>> 

Craig L Russell
c...@apache.org

Reply via email to