storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptgo...@apache.org
Subject [25/50] [abbrv] git commit: Rankings: use private helper method to implement getRankings() for cleaner code
Date Thu, 20 Mar 2014 21:22:48 GMT
Rankings: use private helper method to implement getRankings() for cleaner code


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/eca74600
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/eca74600
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/eca74600

Branch: refs/heads/master
Commit: eca746003408107dcfff4846f6bde55e33ffacc8
Parents: 6d56eae
Author: Michael G. Noll <mnoll@verisign.com>
Authored: Thu Aug 29 12:45:50 2013 +0200
Committer: Michael G. Noll <mnoll@verisign.com>
Committed: Thu Aug 29 12:45:50 2013 +0200

----------------------------------------------------------------------
 src/jvm/storm/starter/tools/Rankings.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/eca74600/src/jvm/storm/starter/tools/Rankings.java
----------------------------------------------------------------------
diff --git a/src/jvm/storm/starter/tools/Rankings.java b/src/jvm/storm/starter/tools/Rankings.java
index 8dbb35f..5ff471a 100644
--- a/src/jvm/storm/starter/tools/Rankings.java
+++ b/src/jvm/storm/starter/tools/Rankings.java
@@ -40,6 +40,10 @@ public class Rankings implements Serializable {
   }
 
   public List<Rankable> getRankings() {
+    return defensiveCopyOf(rankedItems);
+  }
+
+  private List<Rankable> defensiveCopyOf(List<Rankable> list) {
     return Lists.newArrayList(rankedItems);
   }
 


Mime
View raw message