Skip to content

ViewTemplate.create(String) uses non-portable code to read template file, fails on Windows #4

@zelmak

Description

@zelmak

Exception in thread "pool-1-thread-2" java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/Brad/Projects/CleanCodeCaseStudy/target/test-classes/html/frontpage.html at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229) at java.base/java.nio.file.Path.of(Path.java:147) at java.base/java.nio.file.Paths.get(Paths.java:69) at cleancoderscom.view.ViewTemplate.create(ViewTemplate.java:13) at cleancoderscom.usecases.codecastSummaries.CodecastSummariesViewImpl.toHTML(CodecastSummariesViewImpl.java:13) at cleancoderscom.usecases.codecastSummaries.CodecastSummariesViewImpl.generateView(CodecastSummariesViewImpl.java:42) at cleancoderscom.usecases.codecastSummaries.CodecastSummariesController.handle(CodecastSummariesController.java:24) at cleancoderscom.http.Router.route(Router.java:20) at cleancoderscom.utilities.Main.lambda$main$0(Main.java:35) at cleancoderscom.socketserver.SocketServer$1$1.run(SocketServer.java:33) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

Not sure if you want a PR for this as it would have to apply to all the commits all the way down. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions