mirror of https://github.com/sbt/sbt.git
Do not use `ListBuffer#readOnly`
It's dangerous, deprecated, and was removed in 2.12.0-M1. See https://github.com/scala/scala/pull/4140. `ListBuffer#toList` has equivalent performance, except it actually returns an immutable copy(-on-write).
This commit is contained in:
parent
47a9a6db05
commit
a355012c2e
|
|
@ -39,7 +39,7 @@ class BufferedLogger(delegate: AbstractLogger) extends BasicLogger {
|
|||
* Flushes the buffer to the delegate logger. This method calls logAll on the delegate
|
||||
* so that the messages are written consecutively. The buffer is cleared in the process.
|
||||
*/
|
||||
def play(): Unit = synchronized { delegate.logAll(buffer.readOnly); buffer.clear() }
|
||||
def play(): Unit = synchronized { delegate.logAll(buffer.toList); buffer.clear() }
|
||||
/** Clears buffered events and disables buffering. */
|
||||
def clear(): Unit = synchronized { buffer.clear(); recording = false }
|
||||
/** Plays buffered events and disables buffering. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue