< prev index next >

src/java.base/share/classes/java/net/NetworkInterface.java

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea

@@ -339,11 +339,11 @@
      *
      * @apiNote this method can be used in combination with
      * {@link #getInetAddresses()} to obtain all IP addresses for this node
      *
      * @return an Enumeration of NetworkInterfaces found on this machine
-     * @exception  SocketException  if an I/O error occurs,
+     * @throws     SocketException  if an I/O error occurs,
      *             or if the platform does not have at least one configured
      *             network interface.
      * @see #networkInterfaces()
      */
     public static Enumeration<NetworkInterface> getNetworkInterfaces()

@@ -369,11 +369,11 @@
      * Stream<InetAddress> addrs = NetworkInterface.networkInterfaces()
      *     .flatMap(NetworkInterface::inetAddresses);
      * }</pre>
      *
      * @return a Stream of NetworkInterfaces found on this machine
-     * @exception  SocketException  if an I/O error occurs,
+     * @throws     SocketException  if an I/O error occurs,
      *             or if the platform does not have at least one configured
      *             network interface.
      * @since 9
      */
     public static Stream<NetworkInterface> networkInterfaces()

@@ -448,11 +448,11 @@
 
     /**
      * Returns whether a network interface is up and running.
      *
      * @return  {@code true} if the interface is up and running.
-     * @exception       SocketException if an I/O error occurs.
+     * @throws          SocketException if an I/O error occurs.
      * @since 1.6
      */
 
     public boolean isUp() throws SocketException {
         return isUp0(name, index);

@@ -460,11 +460,11 @@
 
     /**
      * Returns whether a network interface is a loopback interface.
      *
      * @return  {@code true} if the interface is a loopback interface.
-     * @exception       SocketException if an I/O error occurs.
+     * @throws          SocketException if an I/O error occurs.
      * @since 1.6
      */
 
     public boolean isLoopback() throws SocketException {
         return isLoopback0(name, index);

@@ -475,11 +475,11 @@
      * A typical point to point interface would be a PPP connection through
      * a modem.
      *
      * @return  {@code true} if the interface is a point to point
      *          interface.
-     * @exception       SocketException if an I/O error occurs.
+     * @throws          SocketException if an I/O error occurs.
      * @since 1.6
      */
 
     public boolean isPointToPoint() throws SocketException {
         return isP2P0(name, index);

@@ -487,11 +487,11 @@
 
     /**
      * Returns whether a network interface supports multicasting or not.
      *
      * @return  {@code true} if the interface supports Multicasting.
-     * @exception       SocketException if an I/O error occurs.
+     * @throws          SocketException if an I/O error occurs.
      * @since 1.6
      */
 
     public boolean supportsMulticast() throws SocketException {
         return supportsMulticast0(name, index);

@@ -506,11 +506,11 @@
      * @return  a byte array containing the address, or {@code null} if
      *          the address doesn't exist, is not accessible or a security
      *          manager is set and the caller does not have the permission
      *          NetPermission("getNetworkInformation")
      *
-     * @exception       SocketException if an I/O error occurs.
+     * @throws          SocketException if an I/O error occurs.
      * @since 1.6
      */
     public byte[] getHardwareAddress() throws SocketException {
         SecurityManager sec = System.getSecurityManager();
         if (sec != null) {

@@ -533,11 +533,11 @@
 
     /**
      * Returns the Maximum Transmission Unit (MTU) of this interface.
      *
      * @return the value of the MTU for that interface.
-     * @exception       SocketException if an I/O error occurs.
+     * @throws          SocketException if an I/O error occurs.
      * @since 1.6
      */
     public int getMTU() throws SocketException {
         return getMTU0(name, index);
     }
< prev index next >