Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 7489 invoked from network); 23 Nov 2009 03:49:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Nov 2009 03:49:03 -0000 Received: (qmail 55251 invoked by uid 500); 23 Nov 2009 03:49:02 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 55137 invoked by uid 500); 23 Nov 2009 03:49:02 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 55126 invoked by uid 99); 23 Nov 2009 03:49:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 03:49:02 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 03:48:59 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 906BE234C04C for ; Sun, 22 Nov 2009 19:48:39 -0800 (PST) Message-ID: <375444819.1258948119577.JavaMail.jira@brutus> Date: Mon, 23 Nov 2009 03:48:39 +0000 (UTC) From: "Chris A. Mattmann (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Commented: (SOLR-1591) XMLWriter#writeAttr silently ignores null attribute values In-Reply-To: <1419643974.1258946680917.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781294#action_12781294 ] Chris A. Mattmann commented on SOLR-1591: ----------------------------------------- I don't get it. If someone passes in a null attribute, this method does nothing. It simply returns. What's the point? You don't get any feedback it's null in that case even and it just wastes a function call? I actually ran into this while trying to write XML output for this georss stuff (accidentally passed in a null ns attr and SOLR was all quiet on the western front...) > XMLWriter#writeAttr silently ignores null attribute values > ---------------------------------------------------------- > > Key: SOLR-1591 > URL: https://issues.apache.org/jira/browse/SOLR-1591 > Project: Solr > Issue Type: Bug > Affects Versions: 1.4 > Environment: My local MacBook pro laptop. > Reporter: Chris A. Mattmann > Priority: Minor > Fix For: 1.5 > > 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.