com.groupbyinc.flux.common.netty.resolver.HostsFileParser.class Maven / Gradle / Ivy
???? 2 9com/groupbyinc/flux/common/netty/resolver/HostsFileParser java/lang/Object HostsFileParser.java WINDOWS_DEFAULT_SYSTEM_ROOT Ljava/lang/String;
C:\Windows WINDOWS_HOSTS_FILE_RELATIVE_PATH \system32\drivers\etc\hosts X_PLATFORMS_HOSTS_FILE_PATH
/etc/hosts WHITESPACES Ljava/util/regex/Pattern; logger GLcom/groupbyinc/flux/common/netty/util/internal/logging/InternalLogger; locateHostsFile ()Ljava/io/File; @com/groupbyinc/flux/common/netty/util/internal/PlatformDependent isWindows ()Z
java/io/File java/lang/StringBuilder ()V !
"
SystemRoot $ java/lang/System & getenv &(Ljava/lang/String;)Ljava/lang/String; ( )
' * append -(Ljava/lang/String;)Ljava/lang/StringBuilder; , -
. toString ()Ljava/lang/String; 0 1
2 (Ljava/lang/String;)V 4
5 exists 7
8 %C:\Windows\system32\drivers\etc\hosts : hostsFile Ljava/io/File;
parseSilently >()Lcom/groupbyinc/flux/common/netty/resolver/HostsFileEntries; java/io/IOException @
B parse L(Ljava/io/File;)Lcom/groupbyinc/flux/common/netty/resolver/HostsFileEntries; D E
F H 'Failed to load and parse hosts file at J getPath L 1
M Ecom/groupbyinc/flux/common/netty/util/internal/logging/InternalLogger O warn *(Ljava/lang/String;Ljava/lang/Throwable;)V Q R P S :com/groupbyinc/flux/common/netty/resolver/HostsFileEntries U EMPTY