From: <raj...@us...> - 2007-06-24 05:20:22
|
Revision: 8407 http://svn.sourceforge.net/cdk/?rev=8407&view=rev Author: rajarshi Date: 2007-06-23 22:20:19 -0700 (Sat, 23 Jun 2007) Log Message: ----------- Updated to take into account that the default value of hydrogen count might be a null value, in which case we take it to be 0. Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/inchi/InChIGenerator.java Modified: trunk/cdk/src/org/openscience/cdk/inchi/InChIGenerator.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/inchi/InChIGenerator.java 2007-06-24 05:03:46 UTC (rev 8406) +++ trunk/cdk/src/org/openscience/cdk/inchi/InChIGenerator.java 2007-06-24 05:20:19 UTC (rev 8407) @@ -235,7 +235,9 @@ // atom.getHydrogenCount() returns number of implict hydrogens, not // total number // Ref: Posting to cdk-devel list by Egon Willighagen 2005-09-17 - int implicitH = atom.getHydrogenCount(); + Integer implicitH = atom.getHydrogenCount(); + if (implicitH == CDKConstants.UNSET) implicitH = 0; + if (implicitH != 0) { iatom.setImplicitH(implicitH); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |