public synchronized Map < String , String > getMetaData ( ) { final Map < String , String > map = new TreeMap <> ( ) ; for ( Entry < Object , Object > entry : properties . entrySet ( ) ) { final String key = ( String ) entry . getKey ( ) ; if ( ! "version" . equals ( key ) ) { if ( key . startsWith ( "NVD CVE " ) ) { try { final long epoch = Long . parseLong ( ( String ) entry . getValue ( ) ) ; final DateTime date = new DateTime ( epoch ) ; final DateTimeFormatter format = DateTimeFormat . forPattern ( "dd/MM/yyyy HH:mm:ss" ) ; final String formatted = format . print ( date ) ; // final Date date = new Date(epoch); // final DateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); // final String formatted = format.format(date); map . put ( key , formatted ) ; } catch ( Throwable ex ) { //deliberately being broad in this catch clause LOGGER . debug ( "Unable to parse timestamp from DB" , ex ) ; map . put ( key , ( String ) entry . getValue ( ) ) ; } } else { map . put ( key , ( String ) entry . getValue ( ) ) ; } } } return map ; }
Returns a map of the meta data from the database properties . This primarily contains timestamps of when the NVD CVE information was last updated .