I am not quite sure what I am seeing in this PR.

I was going to ask you to add a note to the javadoc explaining the API
contract (ie that we trust users to close the provided writer). But then I
got confused, if I am reading the code correctly, the other writers
returned (for example BufferedWriter) will close end up the underlying
stream.

This results in an inconsistent API contract... which I am not wild about.

Since this is an unsupported module should we just break the existing API
contract in order to be clear about expectations?
--
Jody Garnett


On Tue, 17 Mar 2020 at 15:33, Jim Hughes <jhug...@ccri.com> wrote:

> Hi all,
>
> Here's a PR for the discussed approach:
> https://github.com/geotools/geotools/pull/2839
>
> I'm not wild about it, but it does fix the 'regression' / change I saw.  I
> think the idea of the method GeoJSONUtil.toWriter(Object output) is a bit
> too broad, and that means that any solution which keeps the API in place
> will be a little silly looking.
>
> If anyone doesn't like it, the identified approach can readily be used
> downstream in GeoMesa.
>
> Other than that, the GeoTools RC looks pretty reasonable.  I'm hoping that
> we can kick the tires on the GeoServer RC, but that's uncertain.
>
> Cheers,
>
> Jim
> On 3/13/2020 3:34 AM, Andrea Aime wrote:
>
> On Thu, Mar 12, 2020 at 10:11 PM Jim Hughes <jhug...@ccri.com> wrote:
>
>> Hi Andrea,
>>
>> Ah!  The context that some of the Objects need closing and others do not
>> helps clarify things.
>>
>> I just wrote a client side version of such a wrapper to see if it'd work
>> (it does).  Sounds like an amendment to 'toWriter' to have a no-op-close
>> wrapper around the 1) BufferedWriter, 2) Writer, and 3) OutputStream would
>> fit the bill?
>>
>> If so, I can try to put something together.
>>
> Please go ahead!
>
> Cheers
> Andrea
> ==
>
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf
> Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa
> (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
> http://www.geo-solutions.it http://twitter.com/geosolutions_it
> ------------------------------------------------------- *Con riferimento
> alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
> Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
> circostanza inerente alla presente email (il suo contenuto, gli eventuali
> allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
> destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
> errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
> sarei comunque grato se potesse darmene notizia. This email is intended
> only for the person or entity to which it is addressed and may contain
> information that is privileged, confidential or otherwise protected from
> disclosure. We remind that - as provided by European Regulation 2016/679
> “GDPR” - copying, dissemination or use of this e-mail or the information
> herein by anyone other than the intended recipient is prohibited. If you
> have received this email by mistake, please notify us immediately by
> telephone or e-mail.*
>
>
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to