protected void loadCustomSinks ( String fileName , String bugType ) { InputStream stream = null ; try { File file = new File ( fileName ) ; if ( file . exists ( ) ) { stream = new FileInputStream ( file ) ; loadConfiguredSinks ( stream , bugType ) ; } else { stream = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( fileName ) ; loadConfiguredSinks ( stream , bugType ) ; } } catch ( Exception ex ) { throw new RuntimeException ( "Cannot load custom injection sinks from " + fileName , ex ) ; } finally { IO . close ( stream ) ; } }
Loads taint sinks configuration file from file system . If the file doesn t exist on file system loads the file from classpath .