Code Polishing (Sonar)

- remove redundant modifiers
- overridable methods called from ctors

Polishing - PR Comments
This commit is contained in:
Gary Russell
2015-12-03 15:23:12 -05:00
committed by Artem Bilan
parent ddb4321e1d
commit 255247ca9a
56 changed files with 447 additions and 381 deletions

View File

@@ -154,7 +154,7 @@ public class ZookeeperLockRegistry implements ExpirableLockRegistry {
private final String root;
public DefaultKeyToPathStrategy(String rootPath) {
private DefaultKeyToPathStrategy(String rootPath) {
Assert.notNull(rootPath, "'rootPath' cannot be null");
if (!rootPath.endsWith("/")) {
this.root = rootPath + "/";
@@ -184,7 +184,7 @@ public class ZookeeperLockRegistry implements ExpirableLockRegistry {
private long lastUsed;
public ZkLock(CuratorFramework client, String path) {
private ZkLock(CuratorFramework client, String path) {
this.mutex = new InterProcessMutex(client, path);
this.path = path;
}

View File

@@ -42,6 +42,7 @@ import org.springframework.util.Assert;
* the names of which are stored as keys.
*
* @author Marius Bogoevici
* @author Gary Russell
* @since 4.2
*/
public class ZookeeperMetadataStore implements ListenableMetadataStore, SmartLifecycle {
@@ -325,16 +326,16 @@ public class ZookeeperMetadataStore implements ListenableMetadataStore, SmartLif
private final int version;
public LocalChildData(String value, int version) {
private LocalChildData(String value, int version) {
this.value = value;
this.version = version;
}
public String getValue() {
private String getValue() {
return this.value;
}
public int getVersion() {
private int getVersion() {
return this.version;
}
}