From 9778839d9610a9cafac70ff2916e035229d7fcc9 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Thu, 5 Sep 2013 15:35:04 +0400 Subject: [PATCH] Refactorings: remove warnings --- .../jetbrains/jet/util/slicedmap/Slices.java | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/util/slicedmap/Slices.java b/compiler/frontend/src/org/jetbrains/jet/util/slicedmap/Slices.java index 4d4847c5ca3..c3310fcebb3 100644 --- a/compiler/frontend/src/org/jetbrains/jet/util/slicedmap/Slices.java +++ b/compiler/frontend/src/org/jetbrains/jet/util/slicedmap/Slices.java @@ -46,15 +46,14 @@ public class Slices { } public interface KeyNormalizer { - KeyNormalizer DO_NOTHING = new KeyNormalizer() { @Override public Object normalize(Object key) { return key; } }; - K normalize(K key); + K normalize(K key); } public static SliceBuilder sliceBuilder() { @@ -83,7 +82,7 @@ public class Slices { private WritableSlice opposite = null; private KeyNormalizer keyNormalizer = null; - private RewritePolicy rewritePolicy; + private final RewritePolicy rewritePolicy; private String debugName; @@ -130,7 +129,7 @@ public class Slices { @Override public V computeValue(SlicedMap map, K key, V value, boolean valueNotFound) { if (valueNotFound) return defaultValue; - return super.computeValue(map, key, value, valueNotFound); + return super.computeValue(map, key, value, false); } }; } @@ -147,7 +146,7 @@ public class Slices { } return defaultValue; } - return super.computeValue(map, key, value, valueNotFound); + return super.computeValue(map, key, value, false); } }; } @@ -167,18 +166,8 @@ public class Slices { public static class SliceWithOpposite extends BasicRemovableSlice { private final WritableSlice opposite; - - private final KeyNormalizer keyNormalizer; - public SliceWithOpposite(String debugName, RewritePolicy rewritePolicy) { - this(debugName, rewritePolicy, KeyNormalizer.DO_NOTHING); - } - - public SliceWithOpposite(String debugName, RewritePolicy rewritePolicy, KeyNormalizer keyNormalizer) { - this(rewritePolicy, null, keyNormalizer); - } - public SliceWithOpposite(RewritePolicy rewritePolicy, WritableSlice opposite, KeyNormalizer keyNormalizer) { super(rewritePolicy); this.opposite = opposite;