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: socket timeout patch




>By and large I think the existing formatting of these files is ok.
>They look "conforming enough" to me.

I hadn't realised that the space was required between keywords and
brackets. I think I saw some code without that convention (maybe
elsewhere).

The GNU code standard says that there should be a space before every
bracket, here's the example piece of code that is used:


     if (x < foo (y, z))
       haha = bar[4] + 5;
     else
       {
         while (z)
           {
             haha += foo (z, z);
             z--;
           }
         return ++x + bar ();
       }

So I will re-do my patches on clean source. If I need to re-format
I'll submit a formatting patch.



>I have a question about the addition of `#include <stdio.h>' into
>natPlainSocketImpl.cc.  What is that for?

It was for debugging... I will remove it.



>Also, in PlainSocketImpl::setOption, I see this:

>    +  else  // Assume value is an Integer.

>Should we check and throw an exception here if this assumption doesn't
>hold?  (I realize you didn't write this, but I thought you might know
>the answer.)

According to the javadoc, yes we should.

I'll fix that.


Nic


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