commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SANDBOX-209) NullPointerException
Date Sat, 01 Mar 2008 08:21:51 GMT

    [ 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.


Mime
View raw message