Adding a warning for adapted args and fixed the issues associated with it
This commit is contained in:
parent
8f02b4d7ff
commit
6c13b091fb
5 changed files with 8 additions and 8 deletions
|
|
@ -663,8 +663,8 @@ object IO {
|
||||||
if (left > more.length)
|
if (left > more.length)
|
||||||
(Cont(step(left - more.length)), Chunk.empty)
|
(Cont(step(left - more.length)), Chunk.empty)
|
||||||
else
|
else
|
||||||
(Done(), Chunk(more drop left))
|
(Done(()), Chunk(more drop left))
|
||||||
case eof @ EOF(None) ⇒ (Done(), eof)
|
case eof @ EOF(None) ⇒ (Done(()), eof)
|
||||||
case eof @ EOF(cause) ⇒ (Cont(step(left), cause), eof)
|
case eof @ EOF(cause) ⇒ (Cont(step(left), cause), eof)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ abstract class PurePartialFunction[A, B] extends scala.runtime.AbstractFunction1
|
||||||
def apply(x: A, isCheck: Boolean): B
|
def apply(x: A, isCheck: Boolean): B
|
||||||
|
|
||||||
final def isDefinedAt(x: A): Boolean = try { apply(x, true); true } catch { case NoMatch ⇒ false }
|
final def isDefinedAt(x: A): Boolean = try { apply(x, true); true } catch { case NoMatch ⇒ false }
|
||||||
final def apply(x: A): B = try apply(x, false) catch { case NoMatch ⇒ throw new MatchError }
|
final def apply(x: A): B = try apply(x, false) catch { case NoMatch ⇒ throw new MatchError(x) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ object SubclassifiedIndex {
|
||||||
val kids = subkeys flatMap (_ addValue value)
|
val kids = subkeys flatMap (_ addValue value)
|
||||||
if (!(values contains value)) {
|
if (!(values contains value)) {
|
||||||
values += value
|
values += value
|
||||||
kids :+ (key, values)
|
kids :+ ((key, values))
|
||||||
} else kids
|
} else kids
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ object SubclassifiedIndex {
|
||||||
val kids = subkeys flatMap (_ removeValue value)
|
val kids = subkeys flatMap (_ removeValue value)
|
||||||
if (values contains value) {
|
if (values contains value) {
|
||||||
values -= value
|
values -= value
|
||||||
kids :+ (key, values)
|
kids :+ ((key, values))
|
||||||
} else kids
|
} else kids
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +104,7 @@ class SubclassifiedIndex[K, V] private (private var values: Set[V])(implicit sc:
|
||||||
val v = values + value
|
val v = values + value
|
||||||
val n = new Nonroot(key, v)
|
val n = new Nonroot(key, v)
|
||||||
integrate(n)
|
integrate(n)
|
||||||
n.addValue(key, value) :+ (key, v)
|
n.addValue(key, value) :+ ((key, v))
|
||||||
} else ch
|
} else ch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ private[camel] object TestSupport {
|
||||||
camel.template.asyncRequestBody(to, msg).get(timeout.toNanos, TimeUnit.NANOSECONDS)
|
camel.template.asyncRequestBody(to, msg).get(timeout.toNanos, TimeUnit.NANOSECONDS)
|
||||||
} catch {
|
} catch {
|
||||||
case e: ExecutionException ⇒ throw e.getCause
|
case e: ExecutionException ⇒ throw e.getCause
|
||||||
case e: TimeoutException ⇒ throw new AssertionError("Failed to get response to message [%s], send to endpoint [%s], within [%s]" format (msg, to, timeout), e)
|
case e: TimeoutException ⇒ throw new AssertionError("Failed to get response to message [%s], send to endpoint [%s], within [%s]".format(msg, to, timeout))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,7 @@ object AkkaBuild extends Build {
|
||||||
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/",
|
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/",
|
||||||
|
|
||||||
// compile options
|
// compile options
|
||||||
scalacOptions ++= Seq("-encoding", "UTF-8", "-target:jvm-1.6", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls") ++ (
|
scalacOptions ++= Seq("-encoding", "UTF-8", "-target:jvm-1.6", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Ywarn-adapted-args") ++ (
|
||||||
if (true || (System getProperty "java.runtime.version" startsWith "1.7")) Seq() else Seq("-optimize")), // -optimize fails with jdk7
|
if (true || (System getProperty "java.runtime.version" startsWith "1.7")) Seq() else Seq("-optimize")), // -optimize fails with jdk7
|
||||||
javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
|
javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation"),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue