From 162c745ce7006d783347c7bd2d64dff0bb316d6b Mon Sep 17 00:00:00 2001 From: Martin Vysny Date: Mon, 2 Sep 2024 10:05:26 +0300 Subject: [PATCH] #27 minor --- .../main/java/com/github/mvysny/vaadinboot/common/Env.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/github/mvysny/vaadinboot/common/Env.java b/common/src/main/java/com/github/mvysny/vaadinboot/common/Env.java index 882af91..c5a1064 100644 --- a/common/src/main/java/com/github/mvysny/vaadinboot/common/Env.java +++ b/common/src/main/java/com/github/mvysny/vaadinboot/common/Env.java @@ -188,9 +188,11 @@ public static URL findWebRoot() throws MalformedURLException { */ @NotNull public static File findResourcesJarOrFolder(@NotNull URL webRoot) throws IOException { + // we know that the `webapp` folder is somewhere on classpath, and webRoot parameter is pointing to it. + // we need to figure out where exactly on the filesystem the folder is. final File file = FileUtils.toFile(webRoot); if (file != null) { - // probably dev env: serving webroot from a directory + // serving the `webapp` folder from a directory final File classDirectory = file.getAbsoluteFile().getParentFile(); if (!classDirectory.exists()) { throw new IllegalStateException("Invalid state: " + classDirectory + " doesn't exist");