From 0c48ec17930b7925d4a798c4f9a4636d02f0aa2d Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Tue, 2 Jul 2013 11:19:20 +0200 Subject: SI-7592 Remove scala.tools.nsc.util.MultiHashMap --- src/compiler/scala/tools/nsc/util/MultiHashMap.scala | 9 --------- src/interactive/scala/tools/nsc/interactive/Global.scala | 6 +++--- 2 files changed, 3 insertions(+), 12 deletions(-) delete mode 100644 src/compiler/scala/tools/nsc/util/MultiHashMap.scala diff --git a/src/compiler/scala/tools/nsc/util/MultiHashMap.scala b/src/compiler/scala/tools/nsc/util/MultiHashMap.scala deleted file mode 100644 index 67987c6e52..0000000000 --- a/src/compiler/scala/tools/nsc/util/MultiHashMap.scala +++ /dev/null @@ -1,9 +0,0 @@ -package scala.tools.nsc.util - -import scala.collection.{ mutable, immutable } - -/** A hashmap with set-valued values, and an empty set as default value - */ -class MultiHashMap[K, V] extends mutable.HashMap[K, immutable.Set[V]] { - override def default(key: K): immutable.Set[V] = Set() -} diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala index 5875a44025..28b84d67ba 100644 --- a/src/interactive/scala/tools/nsc/interactive/Global.scala +++ b/src/interactive/scala/tools/nsc/interactive/Global.scala @@ -9,8 +9,7 @@ import java.io.{ PrintWriter, StringWriter, FileReader, FileWriter } import scala.collection.mutable import mutable.{LinkedHashMap, SynchronizedMap, HashSet, SynchronizedSet} import scala.util.control.ControlThrowable -import scala.tools.nsc.io.{ AbstractFile } -import scala.tools.nsc.util.MultiHashMap +import scala.tools.nsc.io.AbstractFile import scala.reflect.internal.util.{ SourceFile, BatchSourceFile, Position, NoPosition } import scala.tools.nsc.reporters._ import scala.tools.nsc.symtab._ @@ -181,7 +180,8 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "") protected val toBeRemovedAfterRun: mutable.Set[AbstractFile] = new HashSet[AbstractFile] with SynchronizedSet[AbstractFile] - class ResponseMap extends MultiHashMap[SourceFile, Response[Tree]] { + class ResponseMap extends mutable.HashMap[SourceFile, Set[Response[Tree]]] { + override def default(key: SourceFile): Set[Response[Tree]] = Set() override def += (binding: (SourceFile, Set[Response[Tree]])) = { assert(interruptsEnabled, "delayed operation within an ask") super.+=(binding) -- cgit v1.2.3