# HG changeset patch # User alanb # Date 1549698979 0 # Node ID 4c38eb7c3c839710d516fd2571cb39542202b1e0 # Parent b3e971413a7b44c00550592eeb2101b0a7f1687b Clean-up of JFR support diff -r b3e971413a7b -r 4c38eb7c3c83 src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/SocketInputStreamInstrumentor.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/SocketInputStreamInstrumentor.java Fri Feb 08 18:16:53 2019 +0000 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/SocketInputStreamInstrumentor.java Sat Feb 09 07:56:19 2019 +0000 @@ -28,7 +28,6 @@ import java.io.IOException; import java.net.InetAddress; import java.net.Socket; -import java.net.SocketException; import jdk.jfr.events.SocketReadEvent; @@ -73,17 +72,6 @@ return bytesRead; } + // private field in java.net.Socket$SocketInputStream private Socket parent; - - InetAddress getInetAddress() { - throw new RuntimeException(); - } - - int getPort() { - throw new RuntimeException(); - } - - int getSoTimeout() throws SocketException { - throw new RuntimeException(); - } } diff -r b3e971413a7b -r 4c38eb7c3c83 src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/SocketOutputStreamInstrumentor.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/SocketOutputStreamInstrumentor.java Fri Feb 08 18:16:53 2019 +0000 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/SocketOutputStreamInstrumentor.java Sat Feb 09 07:56:19 2019 +0000 @@ -60,7 +60,7 @@ event.host = remote.getHostName(); event.address = remote.getHostAddress(); event.port = parent.getPort(); - event.bytesWritten = bytesWritten < 0 ? 0 : bytesWritten; + event.bytesWritten = bytesWritten; event.commit(); event.reset(); @@ -68,13 +68,6 @@ } } + // private field in java.net.Socket$SocketOutputStream private Socket parent; - - InetAddress getInetAddress() { - throw new RuntimeException(); - } - - int getPort() { - throw new RuntimeException(); - } }