JDK 9 RFR of JDK-8031201: Fix casting lint issues in java.net
    Joe Darcy 
    joe.darcy at oracle.com
       
    Mon Jan  6 11:36:09 PST 2014
    
    
  
Hello,
Please review the simple patch below to address
      JDK-8031201: Fix casting lint issues in java.net
(The various ObjectInputStream.GetField.get methods which have a default 
parameter, have an property-typed return value already.)
Thanks,
-Joe
diff -r 9af7c1225730 src/share/classes/java/net/Inet6Address.java
--- a/src/share/classes/java/net/Inet6Address.java    Mon Jan 06 
11:00:12 2014 +0000
+++ b/src/share/classes/java/net/Inet6Address.java    Mon Jan 06 
11:34:25 2014 -0800
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights 
reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -604,9 +604,9 @@
          ObjectInputStream.GetField gf = s.readFields();
          byte[] ipaddress = (byte[])gf.get("ipaddress", null);
-        int scope_id = (int)gf.get("scope_id", -1);
-        boolean scope_id_set = (boolean)gf.get("scope_id_set", false);
-        boolean scope_ifname_set = (boolean)gf.get("scope_ifname_set", 
false);
+        int scope_id = gf.get("scope_id", -1);
+        boolean scope_id_set = gf.get("scope_id_set", false);
+        boolean scope_ifname_set = gf.get("scope_ifname_set", false);
          String ifname = (String)gf.get("ifname", null);
          if (ifname != null && !"".equals (ifname)) {
    
    
More information about the net-dev
mailing list