You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Derek Bennett <de...@gmail.com> on 2021/01/27 19:21:22 UTC

NPE in CSVFormat

While writing integration tests for my software, I noticed that many calls
to commons logging were terminating with NullPointerException. I checked
out the code and added input validation to CSVFormat.printRecord. While
adding my unit test, I found that I broke another unit test. It appears
that someone had enshrined the NPE in a unit test as expected behavior. So,
part of my patch is the removal of that unit test. I tried creating a pull
request, but was unable to do so. So, I have attached the patch file here.
Please review it.
I have never created a pull request on GitHub before. So, if this is a case
where I should, please instruct me and I will be glad to.

Thanks,
Derek Bennett

Re: NPE in CSVFormat

Posted by Gary Gregory <ga...@gmail.com>.
CSV does not use LOGGING...

Gary

On Wed, Jan 27, 2021, 21:01 Gilles Sadowski <gi...@gmail.com> wrote:

> Le jeu. 28 janv. 2021 à 02:30, Gary Gregory <ga...@gmail.com> a
> écrit :
> >
> > You can't attach files to this mailing list.
> >
> > You'll have to figure out GitHub PRs so we can see what you're proposing
> to
> > do ;-)
>
> Or use JIRA...
>
> But about the issue itself: Hasn't "Commons Logging" been superseded
> by the "Log4j" project [1] ?
>
> Gilles
>
> [1] https://logging.apache.org/log4j/2.x/
>
> > Gary
> >
> > On Wed, Jan 27, 2021, 15:40 Derek Bennett <de...@gmail.com>
> wrote:
> >
> > > While writing integration tests for my software, I noticed that many
> calls
> > > to commons logging were terminating with NullPointerException. I
> checked
> > > out the code and added input validation to CSVFormat.printRecord. While
> > > adding my unit test, I found that I broke another unit test. It appears
> > > that someone had enshrined the NPE in a unit test as expected
> behavior. So,
> > > part of my patch is the removal of that unit test. I tried creating a
> pull
> > > request, but was unable to do so. So, I have attached the patch file
> here.
> > > Please review it.
> > > I have never created a pull request on GitHub before. So, if this is a
> > > case where I should, please instruct me and I will be glad to.
> > >
> > > Thanks,
> > > Derek Bennett
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: NPE in CSVFormat

Posted by Gilles Sadowski <gi...@gmail.com>.
Le jeu. 28 janv. 2021 à 02:30, Gary Gregory <ga...@gmail.com> a écrit :
>
> You can't attach files to this mailing list.
>
> You'll have to figure out GitHub PRs so we can see what you're proposing to
> do ;-)

Or use JIRA...

But about the issue itself: Hasn't "Commons Logging" been superseded
by the "Log4j" project [1] ?

Gilles

[1] https://logging.apache.org/log4j/2.x/

> Gary
>
> On Wed, Jan 27, 2021, 15:40 Derek Bennett <de...@gmail.com> wrote:
>
> > While writing integration tests for my software, I noticed that many calls
> > to commons logging were terminating with NullPointerException. I checked
> > out the code and added input validation to CSVFormat.printRecord. While
> > adding my unit test, I found that I broke another unit test. It appears
> > that someone had enshrined the NPE in a unit test as expected behavior. So,
> > part of my patch is the removal of that unit test. I tried creating a pull
> > request, but was unable to do so. So, I have attached the patch file here.
> > Please review it.
> > I have never created a pull request on GitHub before. So, if this is a
> > case where I should, please instruct me and I will be glad to.
> >
> > Thanks,
> > Derek Bennett

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


Re: NPE in CSVFormat

Posted by Gary Gregory <ga...@gmail.com>.
You can't attach files to this mailing list.

You'll have to figure out GitHub PRs so we can see what you're proposing to
do ;-)

Gary

On Wed, Jan 27, 2021, 15:40 Derek Bennett <de...@gmail.com> wrote:

> While writing integration tests for my software, I noticed that many calls
> to commons logging were terminating with NullPointerException. I checked
> out the code and added input validation to CSVFormat.printRecord. While
> adding my unit test, I found that I broke another unit test. It appears
> that someone had enshrined the NPE in a unit test as expected behavior. So,
> part of my patch is the removal of that unit test. I tried creating a pull
> request, but was unable to do so. So, I have attached the patch file here.
> Please review it.
> I have never created a pull request on GitHub before. So, if this is a
> case where I should, please instruct me and I will be glad to.
>
> Thanks,
> Derek Bennett
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org