You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to support Double.NaN and not throw an IllegalArgumentException in that case, we had to overwrite the DefaultNumberSystem and have a different implementation for Double. We can currently set our own NumberSystem by calling the setter method Calculus.setCurrentNumberSystem(new MyOwnNumberSystem());
Since we have multiple applications, we would like to have a central system property for setting the NumberSystem in order not to have this line of code in each application and service that uses si-units.
I would suggest changing the line of code in tech.units.indriya.function.Calculus private static final String DEFAULT_NUMBER_SYSTEM = "tech.units.indriya.function.DefaultNumberSystem";
to something like: private static final String DEFAULT_NUMBER_SYSTEM = System.getProperty("si-units.calculus.numberSystem","tech.units.indriya.function.DefaultNumberSystem");
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In order to support Double.NaN and not throw an IllegalArgumentException in that case, we had to overwrite the DefaultNumberSystem and have a different implementation for Double. We can currently set our own NumberSystem by calling the setter method
Calculus.setCurrentNumberSystem(new MyOwnNumberSystem());
Since we have multiple applications, we would like to have a central system property for setting the NumberSystem in order not to have this line of code in each application and service that uses si-units.
I would suggest changing the line of code in tech.units.indriya.function.Calculus
private static final String DEFAULT_NUMBER_SYSTEM = "tech.units.indriya.function.DefaultNumberSystem";
to something like:
private static final String DEFAULT_NUMBER_SYSTEM = System.getProperty("si-units.calculus.numberSystem","tech.units.indriya.function.DefaultNumberSystem");
Beta Was this translation helpful? Give feedback.
All reactions