Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-82-anti-affinity-attempt-2 [created] 3aeab9ca3
SLIDER-82 preparation: java-7 <>-ify some structures Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/bf4a3972 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/bf4a3972 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/bf4a3972 Branch: refs/heads/feature/SLIDER-82-anti-affinity-attempt-2 Commit: bf4a3972951056862dfecfe0ba625aec041d96c4 Parents: 66af973 Author: Steve Loughran <[email protected]> Authored: Wed Oct 14 14:39:19 2015 +0100 Committer: Steve Loughran <[email protected]> Committed: Wed Oct 14 14:39:19 2015 +0100 ---------------------------------------------------------------------- .../slider/core/registry/docstore/PublishedConfigSet.java | 4 ++-- .../core/registry/docstore/PublishedConfiguration.java | 2 +- .../slider/core/registry/docstore/PublishedExports.java | 9 +++++---- .../slider/core/registry/docstore/PublishedExportsSet.java | 8 +++----- .../org/apache/slider/core/registry/docstore/UriMap.java | 2 +- 5 files changed, 12 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/bf4a3972/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java index eac34c0..edc129e 100644 --- a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java +++ b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java @@ -41,7 +41,7 @@ public class PublishedConfigSet { RestPaths.PUBLISHED_CONFIGURATION_REGEXP); public Map<String, PublishedConfiguration> configurations = - new HashMap<String, PublishedConfiguration>(); + new HashMap<>(); public PublishedConfigSet() { } @@ -84,7 +84,7 @@ public class PublishedConfigSet { } public Set<String> keys() { - TreeSet<String> keys = new TreeSet<String>(); + TreeSet<String> keys = new TreeSet<>(); keys.addAll(configurations.keySet()); return keys; } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/bf4a3972/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java index e453fb1..50b522f 100644 --- a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java +++ b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java @@ -47,7 +47,7 @@ public class PublishedConfiguration { public String updatedTime; - public Map<String, String> entries = new HashMap<String, String>(); + public Map<String, String> entries = new HashMap<>(); public PublishedConfiguration() { } http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/bf4a3972/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExports.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExports.java b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExports.java index bf96e8c..0759b4e 100644 --- a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExports.java +++ b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExports.java @@ -41,7 +41,7 @@ public class PublishedExports { public String description; public long updated; public String updatedTime; - public Map<String, List<ExportEntry>> entries = new HashMap<String, List<ExportEntry>>(); + public Map<String, List<ExportEntry>> entries = new HashMap<>(); public PublishedExports() { } @@ -68,7 +68,8 @@ public class PublishedExports { } /** - * Is the configuration empty. This means either that it has not been given any values, or it is stripped down copy + * Is the configuration empty. This means either that it has not been given any values, + * or it is stripped down copy * set down over the wire. * * @return true if it is empty @@ -87,8 +88,8 @@ public class PublishedExports { } /** - * Set the values from an iterable (this includes a Hadoop Configuration and Java properties object). Any existing - * value set is discarded + * Set the values from an iterable (this includes a Hadoop Configuration and Java properties + * object). Any existing value set is discarded * * @param entries entries to put */ http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/bf4a3972/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExportsSet.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExportsSet.java b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExportsSet.java index cdd35de..339d3d6 100644 --- a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExportsSet.java +++ b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExportsSet.java @@ -40,8 +40,7 @@ public class PublishedExportsSet { private static final PatternValidator validator = new PatternValidator( RestPaths.PUBLISHED_CONFIGURATION_REGEXP); - public Map<String, PublishedExports> exports = - new HashMap<String, PublishedExports>(); + public Map<String, PublishedExports> exports = new HashMap<>(); public PublishedExportsSet() { } @@ -84,15 +83,14 @@ public class PublishedExportsSet { } public Set<String> keys() { - TreeSet<String> keys = new TreeSet<String>(); + TreeSet<String> keys = new TreeSet<>(); keys.addAll(exports.keySet()); return keys; } public PublishedExportsSet shallowCopy() { PublishedExportsSet that = new PublishedExportsSet(); - for (Map.Entry<String, PublishedExports> entry : - exports.entrySet()) { + for (Map.Entry<String, PublishedExports> entry : exports.entrySet()) { that.put(entry.getKey(), entry.getValue().shallowCopy()); } return that; http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/bf4a3972/slider-core/src/main/java/org/apache/slider/core/registry/docstore/UriMap.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/UriMap.java b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/UriMap.java index a76e28d..120966f 100644 --- a/slider-core/src/main/java/org/apache/slider/core/registry/docstore/UriMap.java +++ b/slider-core/src/main/java/org/apache/slider/core/registry/docstore/UriMap.java @@ -29,7 +29,7 @@ import java.util.Map; @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) public class UriMap { - public Map<String, String> uris = new HashMap<String, String>(); + public Map<String, String> uris = new HashMap<>(); @JsonIgnore public void put(String key, String value) {
