Mercurial > hg > Members > tatsuki > Alice
diff src/alice/datasegment/LocalDataSegmentManager.java @ 63:498d1d2524d3
change getDataSegmentKey
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 09 Feb 2012 18:53:11 +0900 |
parents | ebdcab7b9b04 |
children | 7aaadd08288c |
line wrap: on
line diff
--- a/src/alice/datasegment/LocalDataSegmentManager.java Thu Feb 09 17:53:24 2012 +0900 +++ b/src/alice/datasegment/LocalDataSegmentManager.java Thu Feb 09 18:53:11 2012 +0900 @@ -19,9 +19,11 @@ } public DataSegmentKey getDataSegmentKey(String key) { - if (key == null) { + DataSegmentKey dsKey= dataSegments.get(key); + if (dsKey != null) + return dsKey; + if (key == null) return null; - } DataSegmentKey newDataSegmentKey = new DataSegmentKey(key); DataSegmentKey dataSegmentKey = dataSegments.putIfAbsent(key, newDataSegmentKey); if (dataSegmentKey == null) {