mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
26.57.2013 099e528f6399dc1655c8d9c5cf60fe2326ef47dd
Fix OPENDJ-1191: Rare NPE in StaticUtils.isLocalAddress()
1 files modified
2 ■■■■■ changed files
opends/src/server/org/opends/server/types/HostPort.java 2 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/types/HostPort.java
@@ -136,6 +136,7 @@
      {
        final Enumeration<NetworkInterface> i =
            NetworkInterface.getNetworkInterfaces();
        if (i != null) {
        final Set<InetAddress> newLocalAddresses = new HashSet<InetAddress>();
        while (i.hasMoreElements())
        {
@@ -148,6 +149,7 @@
        }
        localAddresses = newLocalAddresses;
      }
      }
      catch (SocketException e)
      {
        // Ignore and keep the old set.