Uploaded image for project: 'JBoss Modules'
  1. JBoss Modules
  2. MODULES-406

IllegalArgumentException when iterating modules if module-absent is present

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.12.0.Final
    • 1.11.0.Final
    • XML
    • None
    • Hide
      • Define a module like this in a repo:
      <module-absent xmlns="urn:jboss:module:1.2" name="test.absent" slot="main"/>
      
      • Execute something like the following:
      Iterator<String> names = moduleLoader.iterateModules((String) null, true);
      while (names.hasNext()) {
          String name = names.next();
      }
      
      Show
      Define a module like this in a repo: <module-absent xmlns= "urn:jboss:module:1.2" name= "test.absent" slot= "main" /> Execute something like the following: Iterator< String > names = moduleLoader.iterateModules(( String ) null , true ); while (names.hasNext()) { String name = names.next(); }

      When calling the method iterateModules and there is a module defined with a module-absent the following exception is thrown:

      java.lang.IllegalArgumentException: Module specification is null
      	at org.jboss.modules.ModuleIdentifier.fromString(ModuleIdentifier.java:176)
      	at org.jboss.modules.xml.ModuleXmlParser.parseModuleAbsentContents(ModuleXmlParser.java:606)
      	at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:479)
      	at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:335)
      	at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:293)
      	at org.jboss.modules.LocalModuleFinder$3.hasNext(LocalModuleFinder.java:299)
      	at org.jboss.modules.ModuleLoader$2.hasNext(ModuleLoader.java:348)
      	at org.jboss.modules.LocalModuleLoaderTest.testIterateModules(LocalModuleLoaderTest.java:82)
              ...
      

      This was detected in JBEAP-22428 because 7.4.1 adds a module absent for okhttp3.

              rhn-support-rmartinc Ricardo Martin Camarero
              rhn-support-rmartinc Ricardo Martin Camarero
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: