/** * Return the directory that autofetch file goes into. */ protected static File getAutofetchDir(ServerConfig serverConfig, ResourceSource resourceSource) { String dir = null; if (serverConfig.getAutofetchConfig() != null) { dir = serverConfig.getAutofetchConfig().getLogDirectoryWithEval(); } if (dir != null) { return new File(dir); } String realPath = resourceSource.getRealPath(); if (realPath != null) { return new File(realPath); } else { throw new RuntimeException("No autofetch directory set?"); } }
/** * Return the directory that autofetch file goes into. */ protected static File getAutofetchDir(ServerConfig serverConfig, ResourceSource resourceSource) { String dir = null; if (serverConfig.getAutofetchConfig() != null) { dir = serverConfig.getAutofetchConfig().getLogDirectoryWithEval(); } if (dir != null) { return new File(dir); } String realPath = resourceSource.getRealPath(); if (realPath != null) { return new File(realPath); } else { throw new RuntimeException("No autofetch directory set?"); } }