commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <>
Subject [compress] Patch for SANDBOX-284
Date Tue, 17 Mar 2009 07:48:12 GMT
Hi all,

just made a quick fix for SANDBOX-284:

I could not test it with a general working testcase, since this is a
platform problem and i have only OSX.
However, GUMP will not run on windows too, i guess. I think here is
some refactoring necessary to make
this code more testable.

Before I do this, this brings me to a question of codestyle. I prefer
to do quite less in the constructor. TarArchiveEntry does quite much,
and i think this is necessary in this case. The other option would be
to construct it empty and do all that stuff in a setter, which would
bring no benefit. To make it testable, I would have to extract some
methods from the constructor. Normally I would mark them private, but
private methods cannot be tested, except with reflection.

My question is, is it common use at commons to test with reflection in
that special and rare cases? Or should I mark the package scoped, just
for the sake of testability?

I think I would prefer option one, even when it reminds me on the
story with cannonballs and that birds.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message