src/com/newrelic/metrics/publish/configuration/Config.java
/*
     * Suppressing warnings due to JSONObject implementing map without generic types
     */
Suppressing warnings due to JSONObject implementing map without generic types
Suppressing warnings due to JSONObject implementing map without generic types
@SuppressWarnings("unchecked")
    static void load(File file) throws IOException {
        System.out.println("INFO: Using configuration file " + file.getAbsolutePath());
        Reader reader = new FileReader(file);
        try {
            JSONParser parser = new JSONParser();
            JSONObject jsonObject = (JSONObject) parser.parse(reader);
            config.putAll(jsonObject);
        } catch (ParseException e) {
            throw new IOException(e);
        } finally {
            if (reader != null) reader.close();
        }
    }
@ SuppressWarnings ( "unchecked" ) static void load ( File file ) throws IOException { System . out . println ( "INFO: Using configuration file " + file . getAbsolutePath ( ) ) ; Reader reader = new FileReader ( file ) ; try { JSONParser parser = new JSONParser ( ) ; JSONObject jsonObject = ( JSONObject ) parser . parse ( reader ) ; config . putAll ( jsonObject ) ; } catch ( ParseException e ) { throw new IOException ( e ) ; } finally { if ( reader != null ) reader . close ( ) ; } }
Suppressing warnings due to JSONObject implementing map without generic types
Suppressing warnings due to JSONObject implementing map without generic types