-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64027/#review191887
-----------------------------------------------------------


Ship it!




Ship It!

- Balázs Bence Sári


On Nov. 22, 2017, 12:52 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64027/
> -----------------------------------------------------------
> 
> (Updated Nov. 22, 2017, 12:52 p.m.)
> 
> 
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, and Miklos 
> Gergely.
> 
> 
> Bugs: AMBARI-22499
>     https://issues.apache.org/jira/browse/AMBARI-22499
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Not all numeric values are valid doubles, eg. 86400L is a valid long, but not 
> a double.
> 
> Changed to `NumberUtils.createNumber` instead of `Double.parseDouble` to 
> create the appropriate numeric object.
> Checking `doubleValue()` is necessary for equal values of different types 
> (eg. `0.0` vs `0`).
> 
> Also fixed possible NPE in non-numeric case.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
> eade91458847125df8e50505cb2af5bd67ee0b3d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
>  8a0a78228e72fc14ff361445363fa61d1cc4e977 
> 
> 
> Diff: https://reviews.apache.org/r/64027/diff/1/
> 
> 
> Testing
> -------
> 
> Added unit test:
> 
> ```
> [INFO] Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.31 
> s - in org.apache.ambari.server.state.ConfigHelperTest
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>

Reply via email to