Re: [IMAGING] Logging vs Throwing exceptions

2023-05-31 Thread Peter Hull
That whole class looks like it needs a bit of TLC (or Javadoc at least!)

On Wed, 31 May 2023 at 06:49, Miguel Muñoz  wrote:
>
>
> In addition to logging and swallowing the exception, this method also then 
> returns null. This is also a bad practice.
>
>
>
> The caller has to check for null. One of the reasons exceptions were invented 
> was to free the user from needing to check for null or error codes.
>
> — Miguel
>

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



Re: [IMAGING] Logging vs Throwing exceptions

2023-05-31 Thread Gary Gregory
Miguel,

Don't cut off the thread in the body of the email please.

Gary

On Wed, May 31, 2023, 01:49 Miguel Muñoz  wrote:

>
> In addition to logging and swallowing the exception, this method also then
> returns null. This is also a bad practice.
>
> ​
>
> ​The caller has to check for null. One of the reasons exceptions were
> invented was to free the user from needing to check for null or error codes.
>
> — Miguel​
>


Re: Re: Release Commons Fileupload 1.4.1?

2023-05-31 Thread Maxim Solodovnik
Hello Gary,

are there any news on release? :)

On Mon, 24 Apr 2023 at 19:18, Maxim Solodovnik  wrote:
>
> Thanks for the update!
>
> from mobile (sorry for typos ;)
>
>
> On Mon, Apr 24, 2023, 17:33 Gary Gregory  wrote:
>>
>> I am in the process of releasing commons-parent, then commons-io, then
>> file-upload.
>>
>> Gary
>>
>> On Mon, Apr 24, 2023, 05:09 Maxim Solodovnik  wrote:
>>
>> > Hello Gary,
>> >
>> > any new ETA for the release? :)
>> >
>> > On Mon, 10 Apr 2023 at 19:45, Maxim Solodovnik 
>> > wrote:
>> > >
>> > > Thais for the update! :)
>> > >
>> > > from mobile (sorry for typos ;)
>> > >
>> > >
>> > > On Mon, Apr 10, 2023, 19:38 Gary Gregory  wrote:
>> > >>
>> > >> Within a couple of weeks. There is a little more work up to do and
>> > Commons
>> > >> IO is next on my list.
>> > >>
>> > >> Gary
>> > >>
>> > >> On Sun, Apr 9, 2023, 21:54 Maxim Solodovnik 
>> > wrote:
>> > >>
>> > >> > Hello Gary,
>> > >> >
>> > >> > I saw new commits at the commons-fileupload repo, but no release :(
>> > >> > Can you please share new ETA for the 2.0 release? :)
>> > >> >
>> > >> > On Thu, 30 Mar 2023 at 10:12, Maxim Solodovnik 
>> > >> > wrote:
>> > >> > >
>> > >> > > Thanks a million! :)
>> > >> > >
>> > >> > > On Thu, 30 Mar 2023 at 01:10, Gary Gregory 
>> > >> > wrote:
>> > >> > > >
>> > >> > > > Great, I'll take a closer look and see if it is in a state where
>> > I can
>> > >> > cut
>> > >> > > > a release candidate this weekend.
>> > >> > > >
>> > >> > > > Gary
>> > >> > > >
>> > >> > > > On Wed, Mar 29, 2023, 11:48 Maxim Solodovnik <
>> > solomax...@gmail.com>
>> > >> > wrote:
>> > >> > > >
>> > >> > > > > Hello Gary,
>> > >> > > > >
>> > >> > > > > Apache Wicket (depends on fileupload2) build is green
>> > >> > > > > Manual testing for file upload works as expected
>> > >> > > > >
>> > >> > > > > Apache OpenMeetings (depends on Wicket and fileupload2) build is
>> > >> > green
>> > >> > > > > Manual testing for file upload works as expected
>> > >> > > > >
>> > >> > > > > I would say: I see no issues so far :)
>> > >> > > > >
>> > >> > > > > On Wed, 29 Mar 2023 at 01:13, Gary Gregory <
>> > garydgreg...@gmail.com>
>> > >> > wrote:
>> > >> > > > > >
>> > >> > > > > > You can use the git master branch in your projects and let us
>> > know
>> > >> > if you
>> > >> > > > > > find issues.
>> > >> > > > > >
>> > >> > > > > > Gary
>> > >> > > > > >
>> > >> > > > > >
>> > >> > > > > > On Mon, Mar 27, 2023, 23:01 Maxim Solodovnik <
>> > solo...@apache.org>
>> > >> > wrote:
>> > >> > > > > >
>> > >> > > > > > > Q1 is almost over :(
>> > >> > > > > > > Are you still planning to release 2.0?
>> > >> > > > > > > Do you need any help? :))
>> > >> > > > > > >
>> > >> > > > > > > On 2022/12/07 17:30:35 Gary Gregory wrote:
>> > >> > > > > > > > The next release will be 2.0 which will hopefully happen
>> > Q1
>> > >> > 2023.
>> > >> > > > > > > >
>> > >> > > > > > > > Gary
>> > >> > > > > > > >
>> > >> > > > > > > > On Wed, Dec 7, 2022, 11:28 Dennis Kieselhorst <
>> > d...@apache.org
>> > >> > >
>> > >> > > > > wrote:
>> > >> > > > > > > >
>> > >> > > > > > > > > Well this is the change I'm particularly interested in
>> > to
>> > >> > have
>> > >> > > > > clean
>> > >> > > > > > > > > transitive dependencies but looking at the commit logs
>> > other
>> > >> > useful
>> > >> > > > > > > > > things happened as well. The last release happened in
>> > 2019. I
>> > >> > > > > > > understand
>> > >> > > > > > > > > though that fileupload is implemented differently
>> > nowadays
>> > >> > and
>> > >> > > > > > > > > maintaining this project no longer is a priority.
>> > >> > > > > > > > >
>> > >> > > > > > > > > Dennis
>> > >> > > > > > > > >
>> > >> > > > > > > > >
>> > >> > > > > > > > > On 2022/12/07 16:01:48 Gary Gregory wrote:
>> > >> > > > > > > > >  > This is unlikely to happen for only a dependency
>> > update,
>> > >> > and
>> > >> > > > > also
>> > >> > > > > > > > > since it
>> > >> > > > > > > > >  > is simple to override in Maven, Ivy, and so on.
>> > >> > > > > > > > >  > Recall that we are volunteers here where each person
>> > >> > spends
>> > >> > > > > their
>> > >> > > > > > > > >  > valuable time as they best see fit ;-)
>> > >> > > > > > > > >  >
>> > >> > > > > > > > >  > Gary
>> > >> > > > > > > > >  >
>> > >> > > > > > > > >  > On Wed, Dec 7, 2022, 10:49 Dennis Kieselhorst <
>> > >> > de...@apache.org
>> > >> > > > > >
>> > >> > > > > > > wrote:
>> > >> > > > > > > > >  >
>> > >> > > > > > > > >  > > Hi folks,
>> > >> > > > > > > > >  > >
>> > >> > > > > > > > >  > > would it be possible to release Commons Fileupload
>> > >> > 1.4.1? 1.4
>> > >> > > > > > > still
>> > >> > > > > > > > >  > > contains commons-io 2.2 and requires to explicitly
>> > >> > exclude it
>> > >> > > > > > > > >  > > (CVE-2021-29425).
>> > >> > > > > > > > >  > >
>> > >> > > > > > > > >  > > Thanks,
>> > >> > > > > > > > >  > > Dennis
>> > >> > > > > > > > >  > >
>> > >> > > > > > > > >
>> > >> > > > > > > > >
>> > >> > > > >
>> > 

Re: [ALL] Eventually, soon, Java 11

2023-05-31 Thread Matt Sicker
How about using multi-release jars? That way we can include module-info files 
and version-specific additions while still supporting Java 8 for a while. It 
could require a newer Java compiler while still targeting the Java 8 bytecode 
version.
—
Matt Sicker

> On Apr 23, 2023, at 08:46, Gary Gregory  wrote:
> 
> Hi All,
> 
> In the year 2023, and with Java 21 in EA (https://jdk.java.net/21/), I
> think it is time to start migrating our components from Java 8 to Java
> 11. I imagine this to happen slowly and surely over the course of this
> whole year.
> 
> In addition, originally, it should also be time to update our GitHub
> builds to run on Java 21-EA.
> 
> Gary
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
> 


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



Re: Re: Release Commons Fileupload 1.4.1?

2023-05-31 Thread Gary Gregory
I want release commons-io again and then I should be able to get to
fileupload 2, in the meantime, please test git master.

Gary

On Wed, May 31, 2023, 11:15 Maxim Solodovnik  wrote:

> Hello Gary,
>
> are there any news on release? :)
>
> On Mon, 24 Apr 2023 at 19:18, Maxim Solodovnik 
> wrote:
> >
> > Thanks for the update!
> >
> > from mobile (sorry for typos ;)
> >
> >
> > On Mon, Apr 24, 2023, 17:33 Gary Gregory  wrote:
> >>
> >> I am in the process of releasing commons-parent, then commons-io, then
> >> file-upload.
> >>
> >> Gary
> >>
> >> On Mon, Apr 24, 2023, 05:09 Maxim Solodovnik 
> wrote:
> >>
> >> > Hello Gary,
> >> >
> >> > any new ETA for the release? :)
> >> >
> >> > On Mon, 10 Apr 2023 at 19:45, Maxim Solodovnik 
> >> > wrote:
> >> > >
> >> > > Thais for the update! :)
> >> > >
> >> > > from mobile (sorry for typos ;)
> >> > >
> >> > >
> >> > > On Mon, Apr 10, 2023, 19:38 Gary Gregory 
> wrote:
> >> > >>
> >> > >> Within a couple of weeks. There is a little more work up to do and
> >> > Commons
> >> > >> IO is next on my list.
> >> > >>
> >> > >> Gary
> >> > >>
> >> > >> On Sun, Apr 9, 2023, 21:54 Maxim Solodovnik 
> >> > wrote:
> >> > >>
> >> > >> > Hello Gary,
> >> > >> >
> >> > >> > I saw new commits at the commons-fileupload repo, but no release
> :(
> >> > >> > Can you please share new ETA for the 2.0 release? :)
> >> > >> >
> >> > >> > On Thu, 30 Mar 2023 at 10:12, Maxim Solodovnik <
> solomax...@gmail.com>
> >> > >> > wrote:
> >> > >> > >
> >> > >> > > Thanks a million! :)
> >> > >> > >
> >> > >> > > On Thu, 30 Mar 2023 at 01:10, Gary Gregory <
> garydgreg...@gmail.com>
> >> > >> > wrote:
> >> > >> > > >
> >> > >> > > > Great, I'll take a closer look and see if it is in a state
> where
> >> > I can
> >> > >> > cut
> >> > >> > > > a release candidate this weekend.
> >> > >> > > >
> >> > >> > > > Gary
> >> > >> > > >
> >> > >> > > > On Wed, Mar 29, 2023, 11:48 Maxim Solodovnik <
> >> > solomax...@gmail.com>
> >> > >> > wrote:
> >> > >> > > >
> >> > >> > > > > Hello Gary,
> >> > >> > > > >
> >> > >> > > > > Apache Wicket (depends on fileupload2) build is green
> >> > >> > > > > Manual testing for file upload works as expected
> >> > >> > > > >
> >> > >> > > > > Apache OpenMeetings (depends on Wicket and fileupload2)
> build is
> >> > >> > green
> >> > >> > > > > Manual testing for file upload works as expected
> >> > >> > > > >
> >> > >> > > > > I would say: I see no issues so far :)
> >> > >> > > > >
> >> > >> > > > > On Wed, 29 Mar 2023 at 01:13, Gary Gregory <
> >> > garydgreg...@gmail.com>
> >> > >> > wrote:
> >> > >> > > > > >
> >> > >> > > > > > You can use the git master branch in your projects and
> let us
> >> > know
> >> > >> > if you
> >> > >> > > > > > find issues.
> >> > >> > > > > >
> >> > >> > > > > > Gary
> >> > >> > > > > >
> >> > >> > > > > >
> >> > >> > > > > > On Mon, Mar 27, 2023, 23:01 Maxim Solodovnik <
> >> > solo...@apache.org>
> >> > >> > wrote:
> >> > >> > > > > >
> >> > >> > > > > > > Q1 is almost over :(
> >> > >> > > > > > > Are you still planning to release 2.0?
> >> > >> > > > > > > Do you need any help? :))
> >> > >> > > > > > >
> >> > >> > > > > > > On 2022/12/07 17:30:35 Gary Gregory wrote:
> >> > >> > > > > > > > The next release will be 2.0 which will hopefully
> happen
> >> > Q1
> >> > >> > 2023.
> >> > >> > > > > > > >
> >> > >> > > > > > > > Gary
> >> > >> > > > > > > >
> >> > >> > > > > > > > On Wed, Dec 7, 2022, 11:28 Dennis Kieselhorst <
> >> > d...@apache.org
> >> > >> > >
> >> > >> > > > > wrote:
> >> > >> > > > > > > >
> >> > >> > > > > > > > > Well this is the change I'm particularly
> interested in
> >> > to
> >> > >> > have
> >> > >> > > > > clean
> >> > >> > > > > > > > > transitive dependencies but looking at the commit
> logs
> >> > other
> >> > >> > useful
> >> > >> > > > > > > > > things happened as well. The last release happened
> in
> >> > 2019. I
> >> > >> > > > > > > understand
> >> > >> > > > > > > > > though that fileupload is implemented differently
> >> > nowadays
> >> > >> > and
> >> > >> > > > > > > > > maintaining this project no longer is a priority.
> >> > >> > > > > > > > >
> >> > >> > > > > > > > > Dennis
> >> > >> > > > > > > > >
> >> > >> > > > > > > > >
> >> > >> > > > > > > > > On 2022/12/07 16:01:48 Gary Gregory wrote:
> >> > >> > > > > > > > >  > This is unlikely to happen for only a dependency
> >> > update,
> >> > >> > and
> >> > >> > > > > also
> >> > >> > > > > > > > > since it
> >> > >> > > > > > > > >  > is simple to override in Maven, Ivy, and so on.
> >> > >> > > > > > > > >  > Recall that we are volunteers here where each
> person
> >> > >> > spends
> >> > >> > > > > their
> >> > >> > > > > > > > >  > valuable time as they best see fit ;-)
> >> > >> > > > > > > > >  >
> >> > >> > > > > > > > >  > Gary
> >> > >> > > > > > > > >  >
> >> > >> > > > > > > > >  > On Wed, Dec 7, 2022, 10:49 Dennis Kieselhorst <
> >> > >> > de...@apache.org
> >> > >> > > > > >
> >> > >> > > > > > > wrote:
> >> > >> > > > > > 

Re: [ALL] Eventually, soon, Java 11

2023-05-31 Thread Gary Gregory
I prefer to lead a simpler life Matt ;-)

MR jars are an abomination IMO.

Gary

On Wed, May 31, 2023, 11:51 Matt Sicker  wrote:

> How about using multi-release jars? That way we can include module-info
> files and version-specific additions while still supporting Java 8 for a
> while. It could require a newer Java compiler while still targeting the
> Java 8 bytecode version.
> —
> Matt Sicker
>
> > On Apr 23, 2023, at 08:46, Gary Gregory  wrote:
> >
> > Hi All,
> >
> > In the year 2023, and with Java 21 in EA (https://jdk.java.net/21/), I
> > think it is time to start migrating our components from Java 8 to Java
> > 11. I imagine this to happen slowly and surely over the course of this
> > whole year.
> >
> > In addition, originally, it should also be time to update our GitHub
> > builds to run on Java 21-EA.
> >
> > Gary
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: [ALL] Eventually, soon, Java 11

2023-05-31 Thread Glavo
Java 8 jars can include module-info.class even if they are not
multi-release.
Java 8 does not load module-info.class, so there is no need to use MR for
isolation.

I hope to make our components compatible with Java 8 for 2-4 years.
During this period, we can compile module-info.java separately and package
it into a jar.
Now there is a maven plugin[1] that can help us complete this task.

When Project Valhalla arrives (maybe Java 25), it will bring huge changes
to the Java ecosystem.
At that time, we can refactor all components based on value classes[2] and
universal generics[3],
making them faster, easier to use and more modern.

Glavo

[1]: https://github.com/moditect/moditect
[2]: https://openjdk.org/jeps/8277163
[3]: https://openjdk.org/jeps/8261529

On Thu, Jun 1, 2023 at 2:50 AM Gary Gregory  wrote:

> I prefer to lead a simpler life Matt ;-)
>
> MR jars are an abomination IMO.
>
> Gary
>
> On Wed, May 31, 2023, 11:51 Matt Sicker  wrote:
>
> > How about using multi-release jars? That way we can include module-info
> > files and version-specific additions while still supporting Java 8 for a
> > while. It could require a newer Java compiler while still targeting the
> > Java 8 bytecode version.
> > —
> > Matt Sicker
> >
> > > On Apr 23, 2023, at 08:46, Gary Gregory 
> wrote:
> > >
> > > Hi All,
> > >
> > > In the year 2023, and with Java 21 in EA (https://jdk.java.net/21/), I
> > > think it is time to start migrating our components from Java 8 to Java
> > > 11. I imagine this to happen slowly and surely over the course of this
> > > whole year.
> > >
> > > In addition, originally, it should also be time to update our GitHub
> > > builds to run on Java 21-EA.
> > >
> > > Gary
> > >
> > > -
> > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > For additional commands, e-mail: dev-h...@commons.apache.org
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
> >
>


Re: [ALL] Eventually, soon, Java 11

2023-05-31 Thread Gary Gregory
All active components already are compatible with Java 8 (except one maybe).

Gary

On Wed, May 31, 2023, 15:29 Glavo  wrote:

> Java 8 jars can include module-info.class even if they are not
> multi-release.
> Java 8 does not load module-info.class, so there is no need to use MR for
> isolation.
>
> I hope to make our components compatible with Java 8 for 2-4 years.
> During this period, we can compile module-info.java separately and package
> it into a jar.
> Now there is a maven plugin[1] that can help us complete this task.
>
> When Project Valhalla arrives (maybe Java 25), it will bring huge changes
> to the Java ecosystem.
> At that time, we can refactor all components based on value classes[2] and
> universal generics[3],
> making them faster, easier to use and more modern.
>
> Glavo
>
> [1]: https://github.com/moditect/moditect
> [2]: https://openjdk.org/jeps/8277163
> [3]: https://openjdk.org/jeps/8261529
>
> On Thu, Jun 1, 2023 at 2:50 AM Gary Gregory 
> wrote:
>
> > I prefer to lead a simpler life Matt ;-)
> >
> > MR jars are an abomination IMO.
> >
> > Gary
> >
> > On Wed, May 31, 2023, 11:51 Matt Sicker  wrote:
> >
> > > How about using multi-release jars? That way we can include module-info
> > > files and version-specific additions while still supporting Java 8 for
> a
> > > while. It could require a newer Java compiler while still targeting the
> > > Java 8 bytecode version.
> > > —
> > > Matt Sicker
> > >
> > > > On Apr 23, 2023, at 08:46, Gary Gregory 
> > wrote:
> > > >
> > > > Hi All,
> > > >
> > > > In the year 2023, and with Java 21 in EA (https://jdk.java.net/21/),
> I
> > > > think it is time to start migrating our components from Java 8 to
> Java
> > > > 11. I imagine this to happen slowly and surely over the course of
> this
> > > > whole year.
> > > >
> > > > In addition, originally, it should also be time to update our GitHub
> > > > builds to run on Java 21-EA.
> > > >
> > > > Gary
> > > >
> > > > -
> > > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > > For additional commands, e-mail: dev-h...@commons.apache.org
> > > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > For additional commands, e-mail: dev-h...@commons.apache.org
> > >
> > >
> >
>