Re: [db-jdo] 01/01: Update PropertyUtils.java

2023-04-03 Thread Craig Russell
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 
>  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 '' 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
>>  
>> 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" 
>>> 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 
>>> 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 list) {
>>> +  public static void string2Set(String names, Collection 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 

[GitHub] [db-jdo] sonarcloud[bot] commented on pull request #73: Update PropertyUtils.java

2023-04-03 Thread via GitHub


sonarcloud[bot] commented on PR #73:
URL: https://github.com/apache/db-jdo/pull/73#issuecomment-1495138879

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=db-jdo=73)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=db-jdo=73=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=db-jdo=73=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=db-jdo=73=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=db-jdo=73=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=db-jdo=73=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=db-jdo=73=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=db-jdo=73=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=db-jdo=73=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=db-jdo=73=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=db-jdo=73=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=db-jdo=73=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=db-jdo=73=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=db-jdo=73)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=db-jdo=73=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=db-jdo=73=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jdo-dev-unsubscr...@db.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: Fwd: [db-jdo] 01/01: Update PropertyUtils.java

2023-04-03 Thread Tobias Bouschen

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 '' 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
  
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" 
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 
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 list) {
+  public static void string2Set(String names, Collection 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 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




Fwd: [db-jdo] 01/01: Update PropertyUtils.java

2023-04-03 Thread Craig Russell
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
 
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" 
> 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 
> 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 list) {
> +  public static void string2Set(String names, Collection 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 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



Updates for our quarterly report to the board?

2023-04-03 Thread Bryan Pendleton
Hi all, it's time for our quarterly report, please let me
know of any updates about community activities this
winter that we should include!

thanks,

bryan