Skip to content

Commit

Permalink
Do not remove calculated properties that are not found in the cache.
Browse files Browse the repository at this point in the history
Sovles bug 2038
  • Loading branch information
Arvid Berg committed Jul 2, 2010
1 parent 27ffc2a commit f79125b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@ public synchronized ICDKMolecule getMoleculeAt( int index ) {
}
}
for(IPropertyCalculator<?> calculator:calculators.values()) {
CDKMoleculeUtils.setProperty( mol, calculator.getPropertyName(),
getPropertyFor( index, calculator.getPropertyName() ));
Object propertyValue = getPropertyFor( index,
calculator.getPropertyName() );
if(propertyValue != null)
CDKMoleculeUtils.setProperty( mol,
calculator.getPropertyName(),
propertyValue);
}
}
return mol;
Expand Down

0 comments on commit f79125b

Please sign in to comment.