Skip to content

Commit

Permalink
Daniel Lowe notes passing null here through to the JNI-INCHI can cras…
Browse files Browse the repository at this point in the history
…h the JVM.
  • Loading branch information
johnmay authored and egonw committed Dec 5, 2021
1 parent dfbc328 commit 5471fae
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public class InChIToStructure {
* @throws CDKException
*/
protected InChIToStructure(String inchi, IChemObjectBuilder builder) throws CDKException {
if (inchi == null)
throw new NullPointerException();
try {
input = new JniInchiInputInchi(inchi, "");
} catch (JniInchiException jie) {
Expand All @@ -127,6 +129,8 @@ protected InChIToStructure(String inchi, IChemObjectBuilder builder) throws CDKE
* @throws CDKException
*/
protected InChIToStructure(String inchi, IChemObjectBuilder builder, String options) throws CDKException {
if (inchi == null)
throw new NullPointerException();
try {
input = new JniInchiInputInchi(inchi, options);
} catch (JniInchiException jie) {
Expand All @@ -142,6 +146,8 @@ protected InChIToStructure(String inchi, IChemObjectBuilder builder, String opti
* @throws CDKException
*/
protected InChIToStructure(String inchi, IChemObjectBuilder builder, List<String> options) throws CDKException {
if (inchi == null)
throw new NullPointerException();
try {
input = new JniInchiInputInchi(inchi, options);
} catch (JniInchiException jie) {
Expand Down

0 comments on commit 5471fae

Please sign in to comment.