diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/model/html/HtmlParser.java | 2 | ||||
-rw-r--r-- | src/main/ui/BrowserApp.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/model/html/HtmlParser.java b/src/main/model/html/HtmlParser.java index bfdd57c..d07a2ff 100644 --- a/src/main/model/html/HtmlParser.java +++ b/src/main/model/html/HtmlParser.java @@ -296,7 +296,7 @@ public class HtmlParser { */ private void addNewElementNode() { state = ParserState.HTML; - var node = new ElementNode(currentTag, currentAttributes); + ElementNode node = new ElementNode(currentTag, currentAttributes); if (unfinished.size() != 0) { unfinished.getLast().addChild(node); if (!isSelfClosingTag(currentTag)) { diff --git a/src/main/ui/BrowserApp.java b/src/main/ui/BrowserApp.java index 83880f9..fa47f48 100644 --- a/src/main/ui/BrowserApp.java +++ b/src/main/ui/BrowserApp.java @@ -24,9 +24,9 @@ public class BrowserApp { input = new Scanner(System.in); String pathString = input.next(); - Path path = Path.of(pathString); + Path path = Paths.get(pathString); try { - String file = Files.readString(path); + String file = new String(Files.readAllBytes(path)); HtmlParser parser = new HtmlParser(); println(border); renderHtml(parser.parseHtml(file)); |