From d319fc2bf126dad4c173dbfa3dc25b24b242256e Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Tue, 2 Nov 2010 17:16:38 +0000 Subject: [PATCH] do not store time of release dates in update center --- .../sonar/updatecenter/common/UpdateCenterDeserializer.java | 4 ++-- .../sonar/updatecenter/common/UpdateCenterSerializer.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/UpdateCenterDeserializer.java b/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/UpdateCenterDeserializer.java index dfc7de61055..a388b6ce5b7 100644 --- a/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/UpdateCenterDeserializer.java +++ b/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/UpdateCenterDeserializer.java @@ -60,7 +60,7 @@ public final class UpdateCenterDeserializer { release.setChangelogUrl(get(p, "sonar." + sonarVersion + ".changelogUrl")); release.setDescription(get(p, "sonar." + sonarVersion + ".description")); release.setDownloadUrl(get(p, "sonar." + sonarVersion + ".downloadUrl")); - release.setDate(FormatUtils.toDate(get(p, "sonar." + sonarVersion + ".date"), true)); + release.setDate(FormatUtils.toDate(get(p, "sonar." + sonarVersion + ".date"), false)); center.getSonar().addRelease(release); } @@ -85,7 +85,7 @@ public final class UpdateCenterDeserializer { release.setDownloadUrl(get(p, pluginKey, pluginVersion + ".downloadUrl")); release.setChangelogUrl(get(p, pluginKey, pluginVersion + ".changelogUrl")); release.setDescription(get(p, pluginKey, pluginVersion + ".description")); - release.setDate(toDate(get(p, pluginKey, pluginVersion + ".date"), true)); + release.setDate(toDate(get(p, pluginKey, pluginVersion + ".date"), false)); String[] requiredSonarVersions = StringUtils.split(StringUtils.defaultIfEmpty(get(p, pluginKey, pluginVersion + ".requiredSonarVersions"), ""), ","); for (String requiredSonarVersion : requiredSonarVersions) { release.addRequiredSonarVersions(Version.create(requiredSonarVersion)); diff --git a/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/UpdateCenterSerializer.java b/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/UpdateCenterSerializer.java index f8f4856140c..04de8171eb7 100644 --- a/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/UpdateCenterSerializer.java +++ b/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/UpdateCenterSerializer.java @@ -59,13 +59,13 @@ public final class UpdateCenterSerializer { public static Properties toProperties(UpdateCenter center) { Properties p = new Properties(); - set(p, "date", FormatUtils.toString(center.getDate(), true)); + set(p, "date", FormatUtils.toString(center.getDate(), false)); set(p, "sonar.versions", center.getSonar().getVersions()); for (Release sonarRelease : center.getSonar().getReleases()) { set(p, "sonar." + sonarRelease.getVersion() + ".downloadUrl", sonarRelease.getDownloadUrl()); set(p, "sonar." + sonarRelease.getVersion() + ".changelogUrl", sonarRelease.getChangelogUrl()); set(p, "sonar." + sonarRelease.getVersion() + ".description", sonarRelease.getDescription()); - set(p, "sonar." + sonarRelease.getVersion() + ".date", FormatUtils.toString(sonarRelease.getDate(), true)); + set(p, "sonar." + sonarRelease.getVersion() + ".date", FormatUtils.toString(sonarRelease.getDate(), false)); } List pluginKeys = new ArrayList(); @@ -88,7 +88,7 @@ public final class UpdateCenterSerializer { set(p, plugin, release.getVersion() + ".downloadUrl", release.getDownloadUrl()); set(p, plugin, release.getVersion() + ".changelogUrl", release.getChangelogUrl()); set(p, plugin, release.getVersion() + ".description", release.getDescription()); - set(p, plugin, release.getVersion() + ".date", FormatUtils.toString(release.getDate(), true)); + set(p, plugin, release.getVersion() + ".date", FormatUtils.toString(release.getDate(), false)); } set(p, plugin, "versions", releaseKeys); } -- 2.39.5