From 8bae6cddba56b8254ce54cbc506d78c3e7980525 Mon Sep 17 00:00:00 2001 From: Maximilian Waidelich Date: Thu, 19 Jan 2023 11:37:54 +0900 Subject: [PATCH] changed what lines are not valid --- src/Main.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Main.java b/src/Main.java index ce786ea..2ffcbe2 100644 --- a/src/Main.java +++ b/src/Main.java @@ -5,6 +5,7 @@ import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.time.LocalDateTime; @@ -49,9 +50,9 @@ public class Main { ); private static final List> ILLEGAL_LINES = List.of( - s -> s.equals("localhost"), - s -> s.equals("fe"), - s -> s.equals("ff") + s -> s.equals("0.0.0.0"), + s -> !s.contains("."), + s -> !StandardCharsets.US_ASCII.newEncoder().canEncode(s) ); public static void main(String[] args) {