> On Oct. 7, 2014, 6:18 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java,
> >  line 147
> > <https://reviews.apache.org/r/26413/diff/1/?file=714609#file714609line147>
> >
> >     Could this just be reduced to ...
> >     
> >         node.getChildren().size() > 1
> >         
> >     ?
> 
> Dmytro Shkvyra wrote:
>     Tom, this is necessary, because if we have one child it means that child 
> will be deserialized as object or property. If we have more than two children 
> it should be deserialized as Array.

What I meant was that if the size of the collection of children is greater than 
one then the collection is not empty.  The !isEmpty check is redundant.


- Tom


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


On Oct. 8, 2014, 10:56 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26413/
> -----------------------------------------------------------
> 
> (Updated Oct. 8, 2014, 10:56 a.m.)
> 
> 
> Review request for Ambari, Dmytro Sen and Tom Beerbower.
> 
> 
> Bugs: AMBARI-7676
>     https://issues.apache.org/jira/browse/AMBARI-7676
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Content of files that is presented at 
> /api/v1/stacks/HDP/versions/2.2/services/HDFS/configurations/content# 
> generates invalid json. Commas are missing between sections.
> Result of validation:
> Error: Parse error on line 14:
> ...fs-log4j.xml"  }} {  "href" : "http:/
> ---------------------^
> Expecting 'EOF', '}', ',', ']'
> I've attached JSON I've got
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java
>  59d5a8a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/JsonSerializerTest.java
>  90063a0 
> 
> Diff: https://reviews.apache.org/r/26413/diff/
> 
> 
> Testing
> -------
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO] 
> [INFO] Ambari Main ....................................... SUCCESS [4.405s]
> [INFO] Apache Ambari Project POM ......................... SUCCESS [0.317s]
> [INFO] Ambari Web ........................................ SUCCESS [51.859s]
> [INFO] Ambari Views ...................................... SUCCESS [4.358s]
> [INFO] Ambari Admin View ................................. SUCCESS [28.800s]
> [INFO] Ambari Server ..................................... SUCCESS 
> [22:12.406s]
> [INFO] Ambari Agent ...................................... SUCCESS [15.775s]
> [INFO] Ambari Client ..................................... SUCCESS [0.038s]
> [INFO] Ambari Python Client .............................. SUCCESS [0.350s]
> [INFO] Ambari Groovy Client .............................. SUCCESS [8.022s]
> [INFO] Ambari Shell ...................................... SUCCESS [0.050s]
> [INFO] Ambari Python Shell ............................... SUCCESS [0.044s]
> [INFO] Ambari Groovy Shell ............................... SUCCESS [5.692s]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 24:14.387s
> [INFO] Finished at: Wed Oct 08 13:53:39 FET 2014
> [INFO] Final Memory: 52M/460M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>

Reply via email to