This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: Patch: java.net: socket stuff


On Tue, Nov 25, 2003 at 09:04:26AM -0600, Mohan Embar wrote:
> Hi People,
> 
> >I like the patch, though I'm not a gcj developer. I have one small nit 
> >to pick, though. Instead of copying
> >
> >     if (isClosed())
> >       throw new SocketException("socket is closed");
> >
> >so many times, you could have used a private method to do the checking 
> >and throwing.
> >
> >	checkIfIsClosed();
> 
> This is somewhat related to this:
> 
> http://gcc.gnu.org/ml/java-patches/2003-q4/msg00425.html
> 
> I combined the check into another private variant of getImpl(),
> which could simplify the code even more. I wasn't happy with
> my choice of names, though.

I was very unhappy with this solution. The real code was shorter but imo
it was more difficult to understand. I see no reason to introduce a
method that makes the code more unmaintanable then it already is.


Michael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]