> On July 7, 2015, 9:50 a.m., Robert Levas wrote: > > contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java, > > lines 111-114 > > <https://reviews.apache.org/r/36258/diff/1/?file=1001282#file1001282line111> > > > > Seems like there is an unecessary zip.write(chunk,0,0) being done. > > Maybe this block could be rewritten as > > > > {code} > > while((readLen=in.read(chunk)) != -1) { > > zip.write(chunk, 0, readLen) > > } > > {code} > > > > But maybe this is less readable?
Doh.. wrong markdown.. :| ``` while((readLen=in.read(chunk)) != -1) { zip.write(chunk, 0, readLen) } ``` - Robert ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36258/#review90701 ----------------------------------------------------------- On July 7, 2015, 9:33 a.m., Erik Bergenholtz wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36258/ > ----------------------------------------------------------- > > (Updated July 7, 2015, 9:33 a.m.) > > > Review request for Ambari, Robert Levas and Tom Beerbower. > > > Bugs: AMBARI-12312 > https://issues.apache.org/jira/browse/AMBARI-12312 > > > Repository: ambari > > > Description > ------- > > Filled ending of file by zeroes till the size of power of 2 > > > Diffs > ----- > > > contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java > 7395f8f > > Diff: https://reviews.apache.org/r/36258/diff/ > > > Testing > ------- > > Local deployment, unit tests: > > ------------------------------------------------------- > T E S T S > ------------------------------------------------------- > Running org.apache.ambari.view.filebrowser.FilebrowserTest > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.615 sec > > Results : > > Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 > > > Thanks, > > Erik Bergenholtz > >