Menu

#1 toString() methods fail with NullPointer

closed-fixed
nobody
None
5
2002-12-06
2002-08-04
No

JOEMol.toString() and other toString() methods fail
with NullPointerException unless explicitely an output
streamer was defined.
System.out could be the default streamer, as can do the
Log4J logger.
At least should it not fail the program but give a
proper warning.

Discussion

  • Joerg Kurt Wegner

    Logged In: YES
    user_id=169818

    I think the NullPointerException was caused by another
    problem. For default the JOEMol constructor don't define a
    molecule input and output type. Now JOEMol uses the SDF
    format as input/output default.
    toString() prints an SDF output, if you want another one (e.g.
    SMILES), use toString(IOTypeHolder.instance().getIOType
    ("SMILES"))

    Which other toString methods causes
    NullPointerExceptions ? I will fix them if you send me a list.

     
  • Joerg Kurt Wegner

    • status: open --> open-fixed
     
  • Joerg Kurt Wegner

    • status: open-fixed --> closed-fixed
     
  • Joerg Kurt Wegner

    Logged In: YES
    user_id=169818

    Dafault output type was set to SDF.

     

Log in to post a comment.