jdk/src/share/classes/java/net/Inet4AddressImpl.java
changeset 10596 39b3a979e600
parent 5506 202f599c92aa
child 16870 f35b2bd19761
--- a/jdk/src/share/classes/java/net/Inet4AddressImpl.java	Thu Sep 15 14:10:30 2011 +0100
+++ b/jdk/src/share/classes/java/net/Inet4AddressImpl.java	Fri Sep 16 12:09:04 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, 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
@@ -59,11 +59,11 @@
           /*
            * Let's make sure we use an address of the proper family
            */
-          java.util.Enumeration it = netif.getInetAddresses();
+          java.util.Enumeration<InetAddress> it = netif.getInetAddresses();
           InetAddress inetaddr = null;
           while (!(inetaddr instanceof Inet4Address) &&
                  it.hasMoreElements())
-              inetaddr = (InetAddress) it.nextElement();
+              inetaddr = it.nextElement();
           if (inetaddr instanceof Inet4Address)
               ifaddr = inetaddr.getAddress();
       }