[java] Allow "empty" sources when loading from arguments

Reviewed By: sblackshear, jeremydubreil

Differential Revision: D7186411

fbshipit-source-id: ef174db
master
Tony Hu 7 years ago committed by Facebook Github Bot
parent 279e7d67f0
commit 8f43bdf521

@ -141,12 +141,14 @@ let main load_sources_and_classes =
let classpath, sources, classes = let classpath, sources, classes =
match load_sources_and_classes with match load_sources_and_classes with
| `FromVerboseOut verbose_out_file -> | `FromVerboseOut verbose_out_file ->
JClasspath.load_from_verbose_output verbose_out_file let classpath, sources, classes = JClasspath.load_from_verbose_output verbose_out_file in
if String.Map.is_empty sources then
L.(die InternalError) "Failed to load any Java source code"
else (classpath, sources, classes)
| `FromArguments path -> | `FromArguments path ->
JClasspath.load_from_arguments path JClasspath.load_from_arguments path
in in
if String.Map.is_empty sources then L.(die UserError) "Failed to load any Java source code" do_all_files classpath sources classes
else do_all_files classpath sources classes
let from_arguments path = main (`FromArguments path) let from_arguments path = main (`FromArguments path)

Loading…
Cancel
Save