langtools/src/jdk.dev/share/classes/com/sun/tools/jdeps/ModulesXmlReader.java
changeset 26276 0dca2378aa34
parent 25874 83c19f00452c
child 27579 d1a63c99cdd5
--- a/langtools/src/jdk.dev/share/classes/com/sun/tools/jdeps/ModulesXmlReader.java	Fri Aug 29 14:58:35 2014 +0200
+++ b/langtools/src/jdk.dev/share/classes/com/sun/tools/jdeps/ModulesXmlReader.java	Fri Aug 29 10:46:33 2014 -0700
@@ -71,7 +71,7 @@
             if (Files.exists(mdir) && Files.isDirectory(mdir)) {
                 return ClassFileReader.newInstance(mdir);
             } else {
-                // aggregator module or os-specific module in modules.xml
+                // aggregator module or os-specific module in jdeps-modules.xml
                 // mdir not exist
                 return defaultReader;
             }
@@ -124,8 +124,7 @@
     public Set<Module> load(InputStream in) throws XMLStreamException, IOException {
         Set<Module> modules = new HashSet<>();
         if (in == null) {
-            System.err.println("WARNING: modules.xml doesn't exist");
-            return modules;
+            throw new RuntimeException("jdeps-modules.xml doesn't exist");
         }
         XMLInputFactory factory = XMLInputFactory.newInstance();
         XMLEventReader reader = factory.createXMLEventReader(in, "UTF-8");