diff options
author | Rex Kerr <ichoran@gmail.com> | 2014-01-31 20:56:33 -0800 |
---|---|---|
committer | Rex Kerr <ichoran@gmail.com> | 2014-02-10 18:56:40 -0800 |
commit | b816a83c8c3ac3fac740e3f475e8e773d59b9d46 (patch) | |
tree | 2aa5198bf88434a0b7a0b32e065c2a663ce9534e /src/library/scala/sys/process/ProcessBuilderImpl.scala | |
parent | 59fc37ade773f66eb05c7b2cfebe03abaf767c51 (diff) | |
download | scala-b816a83c8c3ac3fac740e3f475e8e773d59b9d46.tar.gz scala-b816a83c8c3ac3fac740e3f475e8e773d59b9d46.tar.bz2 scala-b816a83c8c3ac3fac740e3f475e8e773d59b9d46.zip |
SI-5994 battling implicits for String.lines
Deprecated ProcessBuilder's lines method and renamed it lineStream.
stream was another possibility, but that seemed more likely to cause conflicts.
streaming was also tried, but feedback was in favor of lineStream.
Also updated tutorial in ProcessBuilder.
I am sure this will break some tests, but because of the name conflict it's hard to be sure where they are. So Jenkins gets to find the problems for me.
Changed name to lineStream.
Diffstat (limited to 'src/library/scala/sys/process/ProcessBuilderImpl.scala')
-rw-r--r-- | src/library/scala/sys/process/ProcessBuilderImpl.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/library/scala/sys/process/ProcessBuilderImpl.scala b/src/library/scala/sys/process/ProcessBuilderImpl.scala index adf6d1e724..236baaf038 100644 --- a/src/library/scala/sys/process/ProcessBuilderImpl.scala +++ b/src/library/scala/sys/process/ProcessBuilderImpl.scala @@ -104,10 +104,10 @@ private[process] trait ProcessBuilderImpl { def !!< = slurp(None, withIn = true) def !!<(log: ProcessLogger) = slurp(Some(log), withIn = true) - def lines: Stream[String] = lines(withInput = false, nonZeroException = true, None) - def lines(log: ProcessLogger): Stream[String] = lines(withInput = false, nonZeroException = true, Some(log)) - def lines_! : Stream[String] = lines(withInput = false, nonZeroException = false, None) - def lines_!(log: ProcessLogger): Stream[String] = lines(withInput = false, nonZeroException = false, Some(log)) + def lineStream: Stream[String] = lineStream(withInput = false, nonZeroException = true, None) + def lineStream(log: ProcessLogger): Stream[String] = lineStream(withInput = false, nonZeroException = true, Some(log)) + def lineStream_! : Stream[String] = lineStream(withInput = false, nonZeroException = false, None) + def lineStream_!(log: ProcessLogger): Stream[String] = lineStream(withInput = false, nonZeroException = false, Some(log)) def ! = run(connectInput = false).exitValue() def !(io: ProcessIO) = run(io).exitValue() @@ -132,7 +132,7 @@ private[process] trait ProcessBuilderImpl { else scala.sys.error("Nonzero exit value: " + code) } - private[this] def lines( + private[this] def lineStream( withInput: Boolean, nonZeroException: Boolean, log: Option[ProcessLogger] |