Skip to content

Commit

Permalink
settings sync: update the cloud-config library to a newer version
Browse files Browse the repository at this point in the history
The newer version fixes makes the 'delete()' method to remove the value from the map.

GitOrigin-RevId: ce3667bdcbc078d795b6a4479500a077f4634c1b
  • Loading branch information
klikh authored and intellij-monorepo-bot committed Apr 12, 2022
1 parent aeb9fe5 commit e644da0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Binary file modified lib/cloud-config-client.jar
Binary file not shown.
Binary file modified lib/src/cloud-config-client-src.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ internal class CloudConfigServerCommunicator : SettingsSyncRemoteCommunicator {
@Throws(IOException::class)
fun delete() {
currentVersionOfFiles.remove(SETTINGS_SYNC_SNAPSHOT_ZIP)
clientVersionContext.store(SETTINGS_SYNC_SNAPSHOT_ZIP, null)
client.delete(SETTINGS_SYNC_SNAPSHOT_ZIP)
}

Expand All @@ -218,9 +217,12 @@ internal class CloudConfigServerCommunicator : SettingsSyncRemoteCommunicator {
return contextVersionMap[path]
}

override fun store(path: String, value: String?) {
if (value != null) contextVersionMap[path] = value
else contextVersionMap.remove(path)
override fun store(path: String, value: String) {
contextVersionMap[path] = value
}

override fun remove(path: String?) {
contextVersionMap.remove(path)
}

fun <T> doWithVersion(version: String?, function: () -> T): T {
Expand Down Expand Up @@ -260,6 +262,10 @@ internal class CloudConfigServerCommunicator : SettingsSyncRemoteCommunicator {
override fun store(path: String, value: String) {
// do nothing
}

override fun remove(path: String?) {
// do nothing
}
}
}
}

0 comments on commit e644da0

Please sign in to comment.