Skip to content

Commit

Permalink
Merge pull request #41670 from dmlloyd/fix-41669
Browse files Browse the repository at this point in the history
Only warn about `module-info` if it exists
  • Loading branch information
gsmet authored Jul 4, 2024
2 parents 541f56d + ee2587d commit 684d70a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ public Iterable<? extends JavaFileObject> getJavaSources(Iterable<? extends File
@Override
public JavaFileObject getJavaFileForInput(Location location, String className, JavaFileObject.Kind kind)
throws IOException {
JavaFileObject file = this.fileManager.getJavaFileForInput(location, className, kind);
// Ignore the module info of the application in dev mode.
if (context.ignoreModuleInfo() && "CLASS_OUTPUT".equalsIgnoreCase(location.getName())
if (file != null && context.ignoreModuleInfo() && "CLASS_OUTPUT".equalsIgnoreCase(location.getName())
&& "module-info".equalsIgnoreCase(className)) {
if (once.compareAndSet(false, true)) {
Logger.getLogger(StaticFileManager.class).info("Ignoring module-info.java in dev mode, " +
"set the `quarkus.live-reload.ignore-module-info` property to `false` in your project descriptor (`pom.xml` or `build.gradle`) to disable this behavior.");
}
return null;
}
return this.fileManager.getJavaFileForInput(location, className, kind);
return file;
}

}

0 comments on commit 684d70a

Please sign in to comment.