static ProcessedLayers process ( final InstalledConfiguration conf , final List < File > moduleRoots , final List < File > bundleRoots ) throws IOException { final ProcessedLayers layers = new ProcessedLayers ( conf ) ; // Process module roots final LayerPathSetter moduleSetter = new LayerPathSetter ( ) { @ Override public boolean setPath ( final LayerPathConfig pending , final File root ) { if ( pending . modulePath == null ) { pending . modulePath = root ; return true ; } return false ; } } ; for ( final File moduleRoot : moduleRoots ) { processRoot ( moduleRoot , layers , moduleSetter ) ; } // Process bundle root final LayerPathSetter bundleSetter = new LayerPathSetter ( ) { @ Override public boolean setPath ( LayerPathConfig pending , File root ) { if ( pending . bundlePath == null ) { pending . bundlePath = root ; return true ; } return false ; } } ; for ( final File bundleRoot : bundleRoots ) { processRoot ( bundleRoot , layers , bundleSetter ) ; } // if (conf.getInstalledLayers().size() != layers.getLayers().size()) { // throw processingError("processed layers don't match expected %s, but was %s", conf.getInstalledLayers(), layers.getLayers().keySet()); // } // if (conf.getInstalledAddOns().size() != layers.getAddOns().size()) { // throw processingError("processed add-ons don't match expected %s, but was %s", conf.getInstalledAddOns(), layers.getAddOns().keySet()); // } return layers ; }
Process the module and bundle roots and cross check with the installed information .