diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 143ec550b4a2430b53a31c2e9d8702b54e11afd0..c924e0757246deea4ec840418bb7bce9a98cf120 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,11 @@ +2003-09-25 Michael Koch <konqueror@gmx.de> + + * gnu/java/net/PlainDatagramSocketImpl.java + (finalize): Moved to directly after constructor. + (getNativeFD): New method. + * gnu/java/net/PlainSocketImpl.java + (getNativeFD): New method. + 2003-09-25 Ingo Proetel <proetel@aicas.com> * java/io/ObjectOutputStream.java: diff --git a/libjava/gnu/java/net/PlainDatagramSocketImpl.java b/libjava/gnu/java/net/PlainDatagramSocketImpl.java index a0785dbc303f7c9d119b7438babc00ec27e64e5e..bc868644e40722f7c61b3dd56c5f864c3c388a57 100644 --- a/libjava/gnu/java/net/PlainDatagramSocketImpl.java +++ b/libjava/gnu/java/net/PlainDatagramSocketImpl.java @@ -112,6 +112,21 @@ public final class PlainDatagramSocketImpl extends DatagramSocketImpl { } + protected void finalize() throws Throwable + { + synchronized (this) + { + if (fnum != -1) + close(); + } + super.finalize(); + } + + public int getNativeFD() + { + return fnum; + } + /** * Binds this socket to a particular port and interface * @@ -267,14 +282,4 @@ public final class PlainDatagramSocketImpl extends DatagramSocketImpl { mcastGrp(((InetSocketAddress)mcastaddr).getAddress(), netIf, false); } - - protected void finalize() throws Throwable - { - synchronized (this) - { - if (fnum != -1) - close(); - } - super.finalize(); - } } diff --git a/libjava/gnu/java/net/PlainSocketImpl.java b/libjava/gnu/java/net/PlainSocketImpl.java index 3edb9745bed35a0458df0ac2815300a02af29cf6..01ba28851d7f3b952f88f8e4e92482514fa9a2dc 100644 --- a/libjava/gnu/java/net/PlainSocketImpl.java +++ b/libjava/gnu/java/net/PlainSocketImpl.java @@ -142,6 +142,11 @@ public final class PlainSocketImpl extends SocketImpl super.finalize(); } + public int getNativeFD() + { + return fnum; + } + /** * Sets the specified option on a socket to the passed in object. For * options that take an integer argument, the passed in object is an