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] | |
>>>>> "Michael" == Michael Koch <konqueror at gmx dot de> writes:
Michael> I commit the attached patch to trunk to add file channel
Michael> support java.io.
Michael> + synchronized (this)
Michael> + {
Michael> + if (ch == null)
Michael> + ch = new FileChannelImpl (fd, false, this);
Michael> +
Michael> + return ch;
Michael> + }
FYI, in cases like this it is more idiomatic to just make the method
synchronized.
Tom
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |