[rfc][icedtea-web] TeeOutputStream Dependency Fix
Jie Kang
jkang at redhat.com
Tue Sep 9 15:34:20 UTC 2014
----- Original Message -----
> On 09/04/2014 at 05:31 PM, Jie Kang wrote:
> > Hello,
> >
> > This patch adds a logger dependency injection to TeeOutputStream so that
> > the tests no longer require a protected function in order to run.
> >
> > Thoughts?
>
> I am not sure whether this approach makes the existing flaw better or worse.
> :-\
> I am going to go with probably worse. Again, why cannot we use reflection
> here
To me the existing flaw is the existence of a protected method used solely for unit testing. This patch removes that method from existence using the DI pattern [1].
Can you elaborate on what is worse?
[1] http://en.wikipedia.org/wiki/Dependency_injection
Thanks,
> to get TeeOutputStream.byteArrayOutputStream and then monitor its flow during
> the test? Really, this is one reason why reflection has been introduced to
> Java.
>
> Jacob
>
--
Jie Kang
More information about the distro-pkg-dev
mailing list