Re: [configuration] org.apache.commons.configuration2.ImmutableConfiguration.getEnum()?

2020-04-26 Thread Xeno Amess
I really think we shall have a common template for Enums

XenoAmess


From: Gary Gregory 
Sent: Monday, April 27, 2020 8:50:22 AM
To: Commons Developers List 
Subject: [configuration] 
org.apache.commons.configuration2.ImmutableConfiguration.getEnum()?

Hi All:

I'd like to have a way to get an enum instance out of
a org.apache.commons.configuration2.ImmutableConfiguration.

I'm surprised there is nothing like a getEnum(...). Any thoughts about
adding:

default > T getEnum(String key, Class enumType) {
return Enum.valueOf(enumType, getString(key));
}

default > T getEnum(String key, Class enumType, String
defaultEnum) {
return Enum.valueOf(enumType, getString(key, defaultEnum));
}

?
Gary


Re: [crypto] Help Releasing new Commons Crypto

2020-04-26 Thread Alex Remily
Just submitted a PR to increase the coverage in the streams package.
While prepping the PR I noticed the Travis Mac build is testing
against LibreSSL, which doesn't successfully load the native libraries
to support JNI:

[WARNING] Tests run: 139, Failures: 0, Errors: 0, Skipped: 42

Note the 42 tests that are skipped.  40 of these tests are skipped
because commons-crypto couldn't find the native library to run the JNI
test.  If possible, I'd recommend configuring the Travis Mac build
with OpenSSL proper, not LibreSSL.  I'd prefer not to support any
derivative distribution.





On Fri, Apr 24, 2020 at 12:16 PM Geoffrey Blake
 wrote:
>
> I figure everyone is a bit busy, but wanted to ask where we are all in
> getting close to a new release of commons-crypto that contains the new
> binaries, Alex, Gary?  Any other unit test areas that need attention
> Alex that you may need help with?
>
> -Geoff
>
> On Wed, Apr 22, 2020 at 11:33 AM Adam Retter
>  wrote:
> >
> > If you want to build on CentOS for releases that is fine - I can add
> > Docker Build Environments as a Travis job that use older CentOS.
> >
> > On Wed, 22 Apr 2020 at 18:02, Geoffrey Blake  
> > wrote:
> > >
> > > I think it depends on whether using Ubuntu 14.04/16.04 as the base
> > > distro for releases is ok.  It seems most projects like to build on
> > > some variant of RHEL/CentOS as they typically use stable (read older)
> > > compilers and libc.
> > >
> > > Does Travis allow building all the binaries then having a final
> > > process that gathers all the artifacts up in the end to perform the
> > > release?
> > >
> > > @garydgregory, thoughts on this?
> > >
> > > On Wed, Apr 22, 2020 at 3:39 AM Adam Retter
> > >  wrote:
> > > >
> > > > No that https://github.com/apache/commons-crypto/pull/96 has been
> > > > merged, we have support for Arm64, ppc64le and x64 in Travis.
> > > >
> > > > I wondered if it was useful for the "Release Process" if we had Travis
> > > > build and store release artifacts? I believe we can have Travis do
> > > > this only when Git tags are created. So if there is a Tag for each
> > > > release (which I assume there is) - then you could have the release
> > > > binaries built and delivered automatically for you. It is possible to
> > > > go as far as having them uploaded to Maven Central (staging) if you
> > > > wished.
> > > >
> > > > On Sat, 18 Apr 2020 at 17:40, Adam Retter  
> > > > wrote:
> > > > >
> > > > > As promised, I added support for further environments to Travis -
> > > > > https://github.com/apache/commons-crypto/pull/96
> > > > >
> > > > > On Mon, 13 Apr 2020 at 16:35, Alex Remily  
> > > > > wrote:
> > > > > >
> > > > > > I don't know whether it would help the build manager with the 
> > > > > > release
> > > > > > process, but I think it would be a good idea to update the build 
> > > > > > matrix
> > > > > > regardless.  I made an attempt a while ago to add coverage for more
> > > > > > environments, but ultimately I wasn't successful.  I don't recall 
> > > > > > if the
> > > > > > limitations were Travis's or my own, but I would certainly welcome 
> > > > > > someone
> > > > > > fleshing out the build matrix to test against OpenSSL 1.0 and 1.1 
> > > > > > APIs in
> > > > > > whatever Windows, Mac, Linux and Arm64 environments Travis 
> > > > > > supports.  My
> > > > > > $0.02.
> > > > > >
> > > > > > Alex
> > > > > >
> > > > > > On Mon, Apr 13, 2020 at 2:53 AM Adam Retter
> > > > > >  wrote:
> > > > > >
> > > > > > > Travis now offer Arm64 and Mac. I could setup a job to build 
> > > > > > > binaries on
> > > > > > > Travis and keep a copy either on every commit or when a tag is 
> > > > > > > created.
> > > > > > > Would that be helpful?
> > > > > > >
> > > > > > > On Mon, 13 Apr 2020, 03:13 Gary Gregory,  
> > > > > > > wrote:
> > > > > > >
> > > > > > > > On Sun, Apr 12, 2020 at 8:57 PM Alex Remily 
> > > > > > > > 
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > I can do the 64 bit builds on Mac, Linux and Windows, so I'm 
> > > > > > > > > happy to
> > > > > > > > > provide whichever of those is required.  It seems that Geoff 
> > > > > > > > > can do the
> > > > > > > > > arm64 build.  Do we even bother supporting 32 bit 
> > > > > > > > > architectures at this
> > > > > > > > > point?
> > > > > > > > >
> > > > > > > >
> > > > > > > > Unfortunately, we cannot just pick up bits from folks here and 
> > > > > > > > there. It
> > > > > > > > all has to be buildable from Maven by the release manager in 
> > > > > > > > order to
> > > > > > > > generate the file signatures properly.
> > > > > > > >
> > > > > > > > Based on what I see in the docs, it looks like this is 
> > > > > > > > buildable using
> > > > > > > > cross-compilation with MinGW on Windows. Not sure about the Mac 
> > > > > > > > stuff
> > > > > > > yet.
> > > > > > > >
> > > > > > > > I'm not sure what the use-case is for 32-bit at this point.
> > > > > > > >
> > > > > > > > Gary
> > > > > > > >
> > > > > > > >
> > > > > >

[configuration] org.apache.commons.configuration2.ImmutableConfiguration.getEnum()?

2020-04-26 Thread Gary Gregory
Hi All:

I'd like to have a way to get an enum instance out of
a org.apache.commons.configuration2.ImmutableConfiguration.

I'm surprised there is nothing like a getEnum(...). Any thoughts about
adding:

default > T getEnum(String key, Class enumType) {
return Enum.valueOf(enumType, getString(key));
}

default > T getEnum(String key, Class enumType, String
defaultEnum) {
return Enum.valueOf(enumType, getString(key, defaultEnum));
}

?
Gary