This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: Patch: java.net: socket stuff
On Tue, Nov 25, 2003 at 11:27:50AM -0600, Mohan Embar wrote:
> Hi Michael,
>
> >> Code duplication is evil ;)
> >
> >Introducing a new method for this really unnecessary. It doenst make the
> >code more clear.
>
> I disagree. Perhaps my getImpl() idea isn't perfect,
> but I think that a assertNotClosed() method like Dalibor suggested
> definitely makes the code clearer and more readable. It also avoids
> repetition of a string constant that you might have to change in n places
> later on. You've already changed the if check once - a helper method
> would have allowed you to change this in only one place.
>
> In the grand scheme of things, I'm not losing a lot of sleep
> over this, but it seems an innocent enough change to make....
Dalibor and I had a talk on IRC and we came to no conclusion. Even Tom
said that we both have our reasons to do so and he has no opinion what
should used. ;-)
Personally I will not change the code but If someone really thinks it
should be changed and can give good reasons he can change it.
Michael