From af6ecde867d3249ae7bab8535f31b46ade6dae9b Mon Sep 17 00:00:00 2001
From: zzz <zzz@i2pmail.org>
Date: Fri, 29 Jan 2021 07:58:59 -0500
Subject: [PATCH] Util: More javadocs for getIP() change

---
 core/java/src/net/i2p/util/Addresses.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/core/java/src/net/i2p/util/Addresses.java b/core/java/src/net/i2p/util/Addresses.java
index 7dc9a63592..5c1389b80c 100644
--- a/core/java/src/net/i2p/util/Addresses.java
+++ b/core/java/src/net/i2p/util/Addresses.java
@@ -394,7 +394,13 @@ public abstract class Addresses {
      *  Unlike InetAddress.getByName(), we do NOT allow numeric IPs
      *  of the form d.d.d, d.d, or d, as these are almost certainly mistakes.
      *
-     *  @param host DNS or IPv4 or IPv6 host name; if null returns null
+     *  InetAddress.getByName() is documented to return 127.0.0.1 for a null host;
+     *  here we return null.
+     *
+     *  InetAddress.getByName() also returns 127.0.0.1 for a host "",
+     *  but this is undocumented; as of 0.9.49, here we return null.
+     *
+     *  @param host DNS or IPv4 or IPv6 host name; if null or empty returns null
      *  @return IP or null
      *  @since 0.9.3
      */
-- 
GitLab