in usage-statistics-impl/src/jetbrains/buildServer/usageStatistics/impl/UsageStatisticsSettingsPersistor.java [50:72]
public UsageStatisticsSettings loadSettings() {
if (!myConfigFile.exists() || !myConfigFile.canRead()) {
return new UsageStatisticsSettings();
}
Element element;
try {
element = FileUtil.parseDocument(myConfigFile);
} catch (Exception e) {
LOG.warnAndDebugDetails("Failed to load usage statistics settings from file \"" + myConfigFile.getAbsolutePath() + "\"", e);
return new UsageStatisticsSettings();
}
String reportingEnabled = element.getAttributeValue(REPORTING_ENABLED);
if (reportingEnabled == null) {
return new UsageStatisticsSettings();
}
UsageStatisticsSettings settings = new UsageStatisticsSettings();
settings.setReportingEnabled(Boolean.parseBoolean(reportingEnabled));
return settings;
}