Skip to content

Commit

Permalink
changed what lines are not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwai committed Jan 19, 2023
1 parent 3b6dff6 commit 8bae6cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -49,9 +50,9 @@ public class Main {
);

private static final List<Function<String, Boolean>> 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) {
Expand Down

0 comments on commit 8bae6cd

Please sign in to comment.