--- a/jdk/src/share/classes/java/net/DatagramSocketImpl.java Wed Apr 23 13:19:21 2014 +0100
+++ b/jdk/src/share/classes/java/net/DatagramSocketImpl.java Wed Apr 23 17:29:51 2014 +0100
@@ -311,6 +311,7 @@
*
* @since 1.9
*/
+ @SuppressWarnings("unchecked")
protected <T> T getOption(SocketOption<T> name) throws IOException {
if (name == StandardSocketOptions.SO_SNDBUF) {
return (T) getOption(SocketOptions.SO_SNDBUF);
--- a/jdk/src/share/classes/java/net/SocketImpl.java Wed Apr 23 13:19:21 2014 +0100
+++ b/jdk/src/share/classes/java/net/SocketImpl.java Wed Apr 23 17:29:51 2014 +0100
@@ -408,6 +408,7 @@
*
* @since 1.9
*/
+ @SuppressWarnings("unchecked")
protected <T> T getOption(SocketOption<T> name) throws IOException {
if (name == StandardSocketOptions.SO_KEEPALIVE) {
return (T)getOption(SocketOptions.SO_KEEPALIVE);
--- a/jdk/src/solaris/classes/java/net/PlainDatagramSocketImpl.java Wed Apr 23 13:19:21 2014 +0100
+++ b/jdk/src/solaris/classes/java/net/PlainDatagramSocketImpl.java Wed Apr 23 17:29:51 2014 +0100
@@ -56,6 +56,7 @@
}
}
+ @SuppressWarnings("unchecked")
protected <T> T getOption(SocketOption<T> name) throws IOException {
if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
return super.getOption(name);
@@ -70,7 +71,7 @@
}
protected Set<SocketOption<?>> supportedOptions() {
- HashSet<SocketOption<?>> options = new HashSet(
+ HashSet<SocketOption<?>> options = new HashSet<>(
super.supportedOptions());
if (flowSupported()) {
--- a/jdk/src/solaris/classes/java/net/PlainSocketImpl.java Wed Apr 23 13:19:21 2014 +0100
+++ b/jdk/src/solaris/classes/java/net/PlainSocketImpl.java Wed Apr 23 17:29:51 2014 +0100
@@ -70,6 +70,7 @@
}
}
+ @SuppressWarnings("unchecked")
protected <T> T getOption(SocketOption<T> name) throws IOException {
if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
return super.getOption(name);
@@ -84,7 +85,7 @@
}
protected Set<SocketOption<?>> supportedOptions() {
- HashSet<SocketOption<?>> options = new HashSet(
+ HashSet<SocketOption<?>> options = new HashSet<>(
super.supportedOptions());
if (getSocket() != null && flowSupported()) {