Skip to content

Commit

Permalink
Added check to ensure a DoubleBondStereochemistry is never created wi…
Browse files Browse the repository at this point in the history
…th more then 2 bonds - this would cause errors with some methods.

Change-Id: Icbfb1902560d1588dec7b95aac3a775053728450
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
johnmay authored and egonw committed Nov 1, 2012
1 parent ab6c308 commit f8f98fe
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -49,6 +49,8 @@ public class DoubleBondStereochemistry implements IDoubleBondStereochemistry {
* <code>ligandBonds[0]</code>, <code>stereoBonds</code>, and <code>ligandBonds[1]</code>.
*/
public DoubleBondStereochemistry(IBond stereoBond, IBond[] ligandBonds, Conformation stereo) {
if(ligandBonds.length > 2)
throw new IllegalArgumentException("expected two ligand bonds");
this.stereoBond = stereoBond;
this.ligandBonds = ligandBonds;
this.stereo = stereo;
Expand Down

0 comments on commit f8f98fe

Please sign in to comment.