Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 63406 invoked from network); 1 Mar 2008 08:22:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Mar 2008 08:22:55 -0000 Received: (qmail 46298 invoked by uid 500); 1 Mar 2008 08:22:49 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 46232 invoked by uid 500); 1 Mar 2008 08:22:49 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 46223 invoked by uid 99); 1 Mar 2008 08:22:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Mar 2008 00:22:49 -0800 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Mar 2008 08:22:21 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4F6AB234C076 for ; Sat, 1 Mar 2008 00:21:51 -0800 (PST) Message-ID: <533272563.1204359711324.JavaMail.jira@brutus> Date: Sat, 1 Mar 2008 00:21:51 -0800 (PST) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (SANDBOX-209) NullPointerException In-Reply-To: <12215005.1202307561439.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SANDBOX-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574081#action_12574081 ] Henri Yandell commented on SANDBOX-209: --------------------------------------- So the API has: public void println(String value) { public void println() { public void println(String[] values) { public void println(String[][] values) { public void printlnComment(String comment) { public void print(String value) { Question being; what should the null functionality be in each case. If you look at either System.out.println or StringWriter, it is to turn 'null' into "null". In the array cases, I guess it would be { "null" } and {{ "null" }}. Very lame. So the other obvious solution would be to implement empty functionality. That still leaves an open question of whether that means nothing happens, or it's akin to an empty string. ie) in the println(null) case, would you expect a newline to be printed. I'm thinking that can be up to the CSVStrategy.ignoreEmptyLines - if it's true, then null means nothing. If false then null means an empty string. Or is that bad because it's reusing a configuration option for something that is not necessarily symmetrical with the usage in the parser :) > NullPointerException > -------------------- > > Key: SANDBOX-209 > URL: https://issues.apache.org/jira/browse/SANDBOX-209 > Project: Commons Sandbox > Issue Type: Bug > Components: CSV > Affects Versions: Nightly Builds > Reporter: Andriy Sholokh > Fix For: Nightly Builds > > > If > public void print(String value) method of CSVPrinter class gets null parameter it throws NullPointerException. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.