On 02/21/2011 11:32 AM, Francesco Chicchiriccò wrote:
On 21/feb/2011, at 10.56, Simone Tripodi wrote:

Hi all, I'd tend agree with Reinhard if the CloseShield
functionality is not simple (and I mean very simple, almost silly)
to replicate into our module. I'm sure the CloseShield in the IO
takes care of more general PrintStream use cases rather then just
the sysout, so I'm worried that the proposed patch is not
enough...

For the sake of clarity: I've proposed that naive patch mainly
because I think that Log*Transformers are there to be used only for
dev purpose, where System.out or FileOutpuStream are the only viable
candidates.

Anyway, I've taken a quick look to
http://s.apache.org/commons-io-close-shield-outputstream and its
parent class http://bit.ly/h7AolY: it seems to me that it would be
quite easy to embed these two classes in order to have a CloseShield
functionality in cocoon3-sax.

If you think that it could be useful to have such functionality there
(also for usage by other classes than just Log*Transformers), please
let me know.

I think the patch with the simple approach is good enough in this case because the class encapsulates the usage of the output stream completely. (It would be different if an output stream was passed to the transformer ...)

Since you get commit access to the repository soon, you can apply the patch yourself ;-) Congratulations BTW!

--
Reinhard Pötz         Founder & Managing Director, Indoqa and Deepsearch
                        http://www.indoqa.com/people/reinhard-poetz.html

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinh...@apache.org
________________________________________________________________________

      Furthermore, I think Oracle has to honor the JSPA agreement.
    http://s.apache.org/JCPIsDead       http://s.apache.org/tck-trap

Reply via email to