Skip to content

Commit

Permalink
Addressing warnings.
Browse files Browse the repository at this point in the history
 - SI-6923 uncovered a few valid warnings, these have been
   addressed.
 - A pair of "catches all throwable" warnings appeared; one
   of the is spurious and the subject of SI-6994.
  • Loading branch information
retronym committed Jan 19, 2013
1 parent 6f72ed8 commit 52a5328
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
debuglog("obtained env: " + e) debuglog("obtained env: " + e)
e.keySet == env.keySet e.keySet == env.keySet
} catch { } catch {
case _ => case _: Throwable =>
debuglog("Could not unify.") debuglog("Could not unify.")
false false
} }
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ trait ContextErrors {
} catch { } catch {
// the code above tries various tricks to detect the relevant portion of the stack trace // the code above tries various tricks to detect the relevant portion of the stack trace
// if these tricks fail, just fall back to uninformative, but better than nothing, getMessage // if these tricks fail, just fall back to uninformative, but better than nothing, getMessage
case NonFatal(ex) => case NonFatal(ex) => // currently giving a spurious warning, see SI-6994
macroLogVerbose("got an exception when processing a macro generated exception\n" + macroLogVerbose("got an exception when processing a macro generated exception\n" +
"offender = " + stackTraceString(realex) + "\n" + "offender = " + stackTraceString(realex) + "\n" +
"error = " + stackTraceString(ex)) "error = " + stackTraceString(ex))
Expand Down
2 changes: 1 addition & 1 deletion src/library/scala/collection/mutable/HashSet.scala
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extends AbstractSet[A]
} }


private def readObject(in: java.io.ObjectInputStream) { private def readObject(in: java.io.ObjectInputStream) {
init(in, x => x) init(in, x => ())
} }


/** Toggles whether a size map is used to track hash map statistics. /** Toggles whether a size map is used to track hash map statistics.
Expand Down
3 changes: 0 additions & 3 deletions src/library/scala/collection/parallel/mutable/ParArray.scala
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ self =>
Array.copy(arr, i, targetarr, 0, until - i) Array.copy(arr, i, targetarr, 0, until - i)
pac.buff.size = pac.buff.size + until - i pac.buff.size = pac.buff.size + until - i
pac.buff.lastPtr.size = until - i pac.buff.lastPtr.size = until - i
pac
} otherwise { } otherwise {
copy2builder_quick(cb, arr, until, i) copy2builder_quick(cb, arr, until, i)
i = until i = until
Expand Down Expand Up @@ -531,7 +530,6 @@ self =>
val targetarr: Array[Any] = pac.lastbuff.internalArray.asInstanceOf[Array[Any]] val targetarr: Array[Any] = pac.lastbuff.internalArray.asInstanceOf[Array[Any]]
reverse2combiner_quick(targetarr, arr, 0, i, until) reverse2combiner_quick(targetarr, arr, 0, i, until)
pac.lastbuff.setInternalSize(sz) pac.lastbuff.setInternalSize(sz)
pac
} otherwise { } otherwise {
cb.ifIs[UnrolledParArrayCombiner[T]] { cb.ifIs[UnrolledParArrayCombiner[T]] {
pac => pac =>
Expand All @@ -542,7 +540,6 @@ self =>
reverse2combiner_quick(targetarr, arr, 0, i, until) reverse2combiner_quick(targetarr, arr, 0, i, until)
pac.buff.size = pac.buff.size + sz pac.buff.size = pac.buff.size + sz
pac.buff.lastPtr.size = sz pac.buff.lastPtr.size = sz
pac
} otherwise super.reverse2combiner(cb) } otherwise super.reverse2combiner(cb)
} }
cb cb
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ extends ParSet[T]
} }


private def readObject(in: java.io.ObjectInputStream) { private def readObject(in: java.io.ObjectInputStream) {
init(in, x => x) init(in, x => ())
} }


import scala.collection.DebugUtils._ import scala.collection.DebugUtils._
Expand Down

0 comments on commit 52a5328

Please sign in to comment.