@ SuppressWarnings ( "unchecked" ) private static Map < String , String > loadData ( ) { final String filePath = "data/cwe.hashmap.serialized" ; try ( InputStream input = FileUtils . getResourceAsStream ( filePath ) ; ObjectInputStream oin = new ObjectInputStream ( input ) ) { return ( HashMap < String , String > ) oin . readObject ( ) ; } catch ( ClassNotFoundException ex ) { LOGGER . warn ( "Unable to load CWE data. This should not be an issue." ) ; LOGGER . debug ( "" , ex ) ; } catch ( IOException ex ) { LOGGER . warn ( "Unable to load CWE data due to an IO Error. This should not be an issue." ) ; LOGGER . debug ( "" , ex ) ; } return null ; }
Loads a HashMap containing the CWE data from a resource found in the jar .