private static File getSafePath()

in src/main/java/org/apache/sling/commons/metrics/rrd4j/impl/CodahaleMetricsReporter.java [148:161]


    private static File getSafePath(BundleContext context, Configuration config) {
        String path = config.path();
        if (path == null || path.isEmpty()) {
            path = DEFAULT_PATH;
        }
        File rrd = new File(path);
        if (!rrd.isAbsolute()) {
            String home = context.getProperty("sling.home");
            if (home != null) {
                rrd = new File(home, rrd.getPath());
            }
        }
        return rrd;
    }