Re: (commons-lang) 01/02: Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier)

2024-05-01 Thread Gary Gregory
It feels like the supplier version is much better to avoid the use case of
building the string in place.

I would also like to centralize all things related directly to sys props in
the SysProp class. This way, you know to look in one place instead of
sometimes here and sometimes there.

Do you think we need both versions of the API?

Gary

On Wed, May 1, 2024, 1:56 PM Bernd Eckenfels  wrote:

> Hi Gregory,
>
> What’s the idea behind that deprecation? The implementation is robust and
> simple and easy to use. I would guess most user rather want to specify a
> literal fallback than a supplier.
>
> Gruss
> Bernd
>
> ggreg...@apache.org wrote on 1. May 2024 16:07 (GMT +02:00):
>
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > ggregory pushed a commit to branch master
> > in repository https://gitbox.apache.org/repos/asf/commons-lang.git
> >
> > commit 794f8aaf1e5a573a63ba6ca514eeb794bd39d855
> > Author: Gary Gregory 
> > AuthorDate: Wed May 1 09:12:09 2024 -0400
> >
> > Deprecate SystemUtils.getUserName(String) in favor of
> > SystemProperties.getUserName(Supplier)
> > ---
> >  src/changes/changes.xml | 1 +
> >  src/main/java/org/apache/commons/lang3/SystemUtils.java | 3 +++
> >  2 files changed, 4 insertions(+)
> >
> > diff --git a/src/changes/changes.xml b/src/changes/changes.xml
> > index cdd3a0cd0..1d896a999 100644
> > --- a/src/changes/changes.xml
> > +++ b/src/changes/changes.xml
> > @@ -123,6 +123,7 @@ The  type attribute can be
> > add,update,fix,remove.
> >  Fix Java version in README.md #1170.
> >  StringUtils.stripAccents() should
> handle
> >  ligatures, UTF32 math blocks, etc. #1201.
> >   >  due-to="kijong.youn, Aakash Gupta, Gary
> >  Gregory">TypeUtils.toString(Type) StackOverflowError for an inner
> >  class in the inner class parameterized enclosing class
> #657.
> > +Deprecate SystemUtils.getUserName(String) in favor of
> > SystemProperties.getUserName(Supplier).
> >  
> >   >  due-to="Dependabot">Bump commons-parent from 64 to 69
> #1194.
> >   >  due-to="Dependabot">Bump org.codehaus.mojo:exec-maven-plugin from
> >  3.1.1 to 3.2.0 #1175.
> > diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java
> > b/src/main/java/org/apache/commons/lang3/SystemUtils.java
> > index cbb4721fb..8044fd4b0 100644
> > --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
> > +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
> > @@ -17,6 +17,7 @@
> >  package org.apache.commons.lang3;
> >
> >  import java.io.File;
> > +import java.util.function.Supplier;
> >
> >  /**
> >   * Helpers for {@link System}.
> > @@ -2041,7 +2042,9 @@ public class SystemUtils {
> >   * access to the specified system property.
> >   * @see SystemProperties#getUserName()
> >   * @since 3.10
> > + * @deprecated Use {@link SystemProperties#getUserName(Supplier)}.
> >   */
> > +@Deprecated
> >  public static String getUserName(final String defaultValue) {
> >  return System.getProperty(SystemProperties.USER_NAME,
> >  defaultValue);
> >  }
> >
> >
>
>
> Gruß
> Bernd
> —
> https://bernd.eckenfels.net
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: (commons-lang) 01/02: Deprecate SystemUtils.getUserName(String) in favor of SystemProperties.getUserName(Supplier)

2024-05-01 Thread Bernd Eckenfels
Hi Gregory,

What’s the idea behind that deprecation? The implementation is robust and 
simple and easy to use. I would guess most user rather want to specify a 
literal fallback than a supplier.

Gruss
Bernd

ggreg...@apache.org wrote on 1. May 2024 16:07 (GMT +02:00):

> This is an automated email from the ASF dual-hosted git repository.
> 
> ggregory pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/commons-lang.git
> 
> commit 794f8aaf1e5a573a63ba6ca514eeb794bd39d855
> Author: Gary Gregory 
> AuthorDate: Wed May 1 09:12:09 2024 -0400
> 
> Deprecate SystemUtils.getUserName(String) in favor of
> SystemProperties.getUserName(Supplier)
> ---
>  src/changes/changes.xml | 1 +
>  src/main/java/org/apache/commons/lang3/SystemUtils.java | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/src/changes/changes.xml b/src/changes/changes.xml
> index cdd3a0cd0..1d896a999 100644
> --- a/src/changes/changes.xml
> +++ b/src/changes/changes.xml
> @@ -123,6 +123,7 @@ The  type attribute can be
> add,update,fix,remove.
>  Fix Java version in README.md #1170.
>  StringUtils.stripAccents() should handle
>  ligatures, UTF32 math blocks, etc. #1201.
>due-to="kijong.youn, Aakash Gupta, Gary
>  Gregory">TypeUtils.toString(Type) StackOverflowError for an inner
>  class in the inner class parameterized enclosing class #657.
> +Deprecate SystemUtils.getUserName(String) in favor of
> SystemProperties.getUserName(Supplier).
>  
>due-to="Dependabot">Bump commons-parent from 64 to 69 #1194.
>due-to="Dependabot">Bump org.codehaus.mojo:exec-maven-plugin from
>  3.1.1 to 3.2.0 #1175.
> diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java
> b/src/main/java/org/apache/commons/lang3/SystemUtils.java
> index cbb4721fb..8044fd4b0 100644
> --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
> +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
> @@ -17,6 +17,7 @@
>  package org.apache.commons.lang3;
>  
>  import java.io.File;
> +import java.util.function.Supplier;
>  
>  /**
>   * Helpers for {@link System}.
> @@ -2041,7 +2042,9 @@ public class SystemUtils {
>   * access to the specified system property.
>   * @see SystemProperties#getUserName()
>   * @since 3.10
> + * @deprecated Use {@link SystemProperties#getUserName(Supplier)}.
>   */
> +@Deprecated
>  public static String getUserName(final String defaultValue) {
>  return System.getProperty(SystemProperties.USER_NAME,
>  defaultValue);
>  }
> 
> 


Gruß
Bernd
— 
https://bernd.eckenfels.net

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [VOTE] Release Apache Commons CSV 1.11.0 based on RC1

2024-05-01 Thread Thomas Vandahl
Hi Gary,

> Am 29.04.2024 um 00:24 schrieb Gary Gregory :
> 
> We have fixed a few bugs and added enhancements (better Microsoft
> Excel compatibility) since Apache Commons CSV 1.10.0 was released, so
> I would like to release Apache Commons CSV 1.11.0.
> 
>  [X] +1 Release these artifacts
>  [ ] +0 OK, but...
>  [ ] -0 OK, but really should fix...
>  [ ] -1 I oppose this release because...
> 

Signatures and hashes are ok.

Build and tests run ok with "mvn clean verify site" using
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Java version: 17.0.8, vendor: Oracle Corporation, runtime: 
/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "11.7.10", arch: "x86_64", family: "mac"

Bye, Thomas 

Re: [Configuration] new feature - containsValue

2024-05-01 Thread Ricardo Mendes
Thank you,

I have submitted a draft PR as instructed.


On Wed, 1 May 2024 at 07:10, Claude Warren  wrote:

> Ricardo,
>
> Thank you for your effort and contribution.  I find it difficult to
> evaluate your work without a pull request (a draft one will do) to show
> what changes you have made.  It just makes reviewing much easier.  Can you
> open a draft pull request please?
>
> Claude
>
> On Wed, May 1, 2024 at 3:54 AM Ricardo Mendes  >
> wrote:
>
> > Good evening,
> >
> > I have been working on a new small feature which aims to validate if a
> > value is present in a configuration through a first match validation.
> >
> > This is useful when looking for specific values in multiple
> configurations
> > and often can be leveraged to return the right Configuration if a value
> is
> > present.
> >
> > It can also be used to validate the integrity of a Configuration.
> >
> > It is natively present in *java.util.Properties* (see JavaDoc
> > <
> >
> https://docs.oracle.com/javase/8/docs/api/java/util/Hashtable.html#containsValue-java.lang.Object-
> > >
> > ).
> >
> > I would like to ask if you find this worthy of being added to
> > *commons.configuration2* and I would like to ask if it is ok if I submit
> a
> > PR with this implementation?
> >
> > *My fork: *
> >
> >
> https://github.com/rikkarth/commons-configuration/tree/feat/configuration-contains-value
> >
> > Worth noting that this is my first implementation and I haven't written
> any
> > JavaDoc or cleaned up (too much at least).
> >
> > I've made some tests which are passing (not on GitHub apparently).
> >
> > I would appreciate any feedback in regards to this implementation.
> >
> > Thank you for your time and consideration.
> >
> > Best Regards
> > Ricardo Mendes
> >
>
>
> --
> LinkedIn: http://www.linkedin.com/in/claudewarren
>