lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris A. Mattmann (JIRA)" <>
Subject [jira] Commented: (SOLR-1591) XMLWriter#writeAttr silently ignores null attribute values
Date Wed, 13 Jan 2010 15:38:54 GMT


Chris A. Mattmann commented on SOLR-1591:

bq. Why are you arguing performance if you're going to look up the key twice? It's an order
of magnitude more expensive.

Just copied it through from your example. Your point was to show it was a bit messier to do
the check and my point was to show it's all about how you organize that messiness.

bq. This is such a trivial issue though... we really shouldn't be wasting breath on it.

Fantastic point. You threw up a suggestion: 

And if we moved the null check to the callers, I'd argue that the null check should be entirely
left out of writeAttr - skip the extra code and let the NPE happen naturally.

That sounds like a plan, +1 to that. Then, we can stop wasting time on this and move on to
(more) interesting stuff...

> XMLWriter#writeAttr silently ignores null attribute values
> ----------------------------------------------------------
>                 Key: SOLR-1591
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.1.0
>         Environment: My local MacBook pro laptop.
>            Reporter: Chris A. Mattmann
>            Priority: Minor
>         Attachments: SOLR-1591.Mattmann.112209.patch.txt
> XMLWriter#writeAttr checks for val == null, and if so, does nothing. Instead of doing
nothing, it could leverage its method signature, and throw an IOException declaring that the
value provided is null. Patch, attached.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message