Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 65805 invoked from network); 4 Aug 2010 19:13:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Aug 2010 19:13:41 -0000 Received: (qmail 16185 invoked by uid 500); 4 Aug 2010 19:13:40 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 16098 invoked by uid 500); 4 Aug 2010 19:13:39 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 16090 invoked by uid 99); 4 Aug 2010 19:13:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Aug 2010 19:13:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Aug 2010 19:13:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o74JDI6D018010 for ; Wed, 4 Aug 2010 19:13:18 GMT Message-ID: <585828.163911280949198617.JavaMail.jira@thor> Date: Wed, 4 Aug 2010 15:13:18 -0400 (EDT) From: "David Smiley (JIRA)" To: dev@lucene.apache.org Subject: [jira] Created: (SOLR-2027) SolrJ FacetField should never return null from getValues() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 SolrJ FacetField should never return null from getValues() ---------------------------------------------------------- Key: SOLR-2027 URL: https://issues.apache.org/jira/browse/SOLR-2027 Project: Solr Issue Type: Improvement Components: clients - java Affects Versions: 1.4.1 Reporter: David Smiley Priority: Minor In some circumstances, FacetField.getValues() will return null. I'd like for my iteration code to simply be: {code:java} for (c : ff.getValues() { // ... } {code} However this will throw an NPE if I don't wrap this in either a null check or this check: ff.getValueCount() > 0 I propose that getValues() return a Collections.EMPTY_LIST if the internal value is null. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org