isRFC3986HostName applies to IPv4 addresses so we can safe the test
MODIFY
src/main/java/org/apache/commons/io/FilenameUtils.java
src/main/java/org/apache/commons/io/FilenameUtils.java
@@ -1509,7 +1509,7 @@ public static boolean wildcardMatch(final String fileName, final String wildcard
* @return true if the given name is a valid host name
*/
private static boolean isValidHostName(String name) {
- return isIPv4Address(name) || isIPv6Address(name) || isRFC3986HostName(name);
+ return isIPv6Address(name) || isRFC3986HostName(name);
}
private static final Pattern IPV4_PATTERN =

isRFC3986HostName applies to IPv4 addresses so we can safe the test