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
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 o
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
Le mer. 10 mai 2023 à 12:29, Gilles Sadowski a écrit :
>
> Hello.
>
> Le mar. 9 mai 2023 à 23:43, Gary D. Gregory a écrit :
> >
> > Hi All,
> >
> > The method
> > org.apache.commons.imaging.icc.IccProfileParser.getICCProfileInfo(ByteSource)
> > looks like:
> >
> > public IccProfileInfo getI
Hello.
Le mar. 9 mai 2023 à 23:43, Gary D. Gregory a écrit :
>
> Hi All,
>
> The method
> org.apache.commons.imaging.icc.IccProfileParser.getICCProfileInfo(ByteSource)
> looks like:
>
> public IccProfileInfo getICCProfileInfo(final ByteSource byteSource) {
> // TODO Throw instead of
Hi All,
The method
org.apache.commons.imaging.icc.IccProfileParser.getICCProfileInfo(ByteSource)
looks like:
public IccProfileInfo getICCProfileInfo(final ByteSource byteSource) {
// TODO Throw instead of logging?
final IccProfileInfo result;
try (InputStream is = by