Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BasicValidator.ValidateIsotopeExistence(IIsotope isotope) when isotope.mass is null #477

Closed
k-ujihara opened this issue Jul 28, 2018 · 2 comments
Assignees

Comments

@k-ujihara
Copy link
Contributor

This post is transferred from the post on k-ujihara/NCDK#10.
I don't know what is the proper behavior of org.openscience.cdk.validate.BasicValidator.ValidateIsotopeExistence(IIsotope isotope) method when isotope.getMassNumber() is null or 0.
I guess report.addWarning(isotopeExists) is better than addError.

Do you have any idea?

@johnmay
Copy link
Member

johnmay commented Jul 28, 2018

null = natural abundance, a lot of other toolkits will use 0 (I actually prefer that to avoid the NPE). Therefore I believe It should treat null the same as it currently treats 0. Also it could check this before fetching the list of possible of isotopes.

@egonw egonw self-assigned this Oct 11, 2018
@johnmay
Copy link
Member

johnmay commented Oct 16, 2018

Closed via #489

@johnmay johnmay closed this as completed Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants