protected void loadCacheMapping ( ) { File f = new File ( getCacheFilePath ( ) ) ; if ( f . exists ( ) ) { try ( InputStream is = new FileInputStream ( f ) ; BufferedReader rd = new BufferedReader ( new FileReader ( f ) ) ) { cacheProperties . load ( is ) ; for ( Enumeration < ? > properyNames = cacheProperties . propertyNames ( ) ; properyNames . hasMoreElements ( ) ; ) { String propName = ( String ) properyNames . nextElement ( ) ; if ( propName . startsWith ( JAWR_MAPPING_PREFIX ) ) { String value = cacheProperties . getProperty ( propName ) ; String resourceMapping = propName . substring ( JAWR_MAPPING_PREFIX . length ( ) ) ; String [ ] mappings = value . split ( SEMICOLON ) ; List < FilePathMapping > fMappings = new CopyOnWriteArrayList <> ( ) ; // TODO check the use of mappingModified boolean mappingModified = true ; for ( String fmapping : mappings ) { String [ ] mapping = fmapping . split ( MAPPING_TIMESTAMP_SEPARATOR ) ; long lastModified = Long . parseLong ( mapping [ 1 ] ) ; String filePath = mapping [ 0 ] ; if ( rsHandler . getLastModified ( filePath ) != lastModified ) { mappingModified = false ; break ; } FilePathMapping fmap = new FilePathMapping ( filePath , lastModified ) ; fMappings . add ( fmap ) ; } if ( mappingModified ) { linkedResourceMap . put ( resourceMapping , fMappings ) ; } } } } catch ( IOException e ) { throw new BundlingProcessException ( "Unable to initialize " + getName ( ) + " Generator cache" , e ) ; } } }
Loads the less file mapping