Re: [Geoserver-devel] IOUtils.zipDirectory issue
On 4/1/10 12:21 AM, Gabriel Roldan wrote: > Hey, > > for the GeoNode process I'm using the > org.geoserver.data.util.IOUtils.zipDirectory method (indirectly through > shape-zipping). > Problem is that this method is taking ownership of its argument > ZipOutputStream since its calling zipout.finish(), essentially > preventing the calling code (which owns the zip output stream) to append > more content to the zip archive. > > As far as I can tell the only code using this is the > ShapeZipOutputFormat? (for which I'm going to propose a refactor in a > separate email). I thought restconfig might be using it as well to send zip files back to the client... but I think that could be another method I am thinking of. Might want to double check. > > So I would like to prevent the utility method from calling > ZipOutputStream.finish() at all and instead leave the responsibility to > the calling code, which I think would be more appropriate. How about overloading the method with a flag called "finish" and by default have it set to true. Then your code can just pass in false. Ensures that no client code can break. > > thoughts? > > Cheers, > Gabriel > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Re: [Geoserver-devel] IOUtils.zipDirectory issue
Gabriel Roldan ha scritto: >> >>> So I would like to prevent the utility method from calling >>> ZipOutputStream.finish() at all and instead leave the responsibility >>> to the calling code, which I think would be more appropriate. >> >> Works for me > > Ok cool. GeoNode is using 2.0.2 so I would need to apply to the stable > branch. Concerns? None, it's a one liner, no? Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Re: [Geoserver-devel] IOUtils.zipDirectory issue
> >> So I would like to prevent the utility method from calling >> ZipOutputStream.finish() at all and instead leave the responsibility >> to the calling code, which I think would be more appropriate. > > Works for me Ok cool. GeoNode is using 2.0.2 so I would need to apply to the stable branch. Concerns? > > Cheers > Andrea > -- Gabriel Roldan OpenGeo - http://opengeo.org Expert service straight from the developers. -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Re: [Geoserver-devel] IOUtils.zipDirectory issue
Gabriel Roldan ha scritto: > Hey, > > for the GeoNode process I'm using the > org.geoserver.data.util.IOUtils.zipDirectory method (indirectly through > shape-zipping). > Problem is that this method is taking ownership of its argument > ZipOutputStream since its calling zipout.finish(), essentially > preventing the calling code (which owns the zip output stream) to append > more content to the zip archive. > > As far as I can tell the only code using this is the > ShapeZipOutputFormat? (for which I'm going to propose a refactor in a > separate email). Dangerous business, every time I touch that class it breaks in some way (it's handling a ton of use cases) > So I would like to prevent the utility method from calling > ZipOutputStream.finish() at all and instead leave the responsibility to > the calling code, which I think would be more appropriate. Works for me Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel