Avoid Array.ofDim where possible #22516

This commit is contained in:
Johan Andrén 2017-03-13 17:49:45 +01:00 committed by GitHub
parent 5ea2e0536c
commit 7a0e5b31f8
33 changed files with 74 additions and 75 deletions

View file

@ -38,7 +38,7 @@ object GraphInterpreterSpecKit {
var inOwners = SMap.empty[Inlet[_], GraphStageLogic]
var outOwners = SMap.empty[Outlet[_], GraphStageLogic]
val logics = Array.ofDim[GraphStageLogic](upstreams.length + stages.length + downstreams.length)
val logics = new Array[GraphStageLogic](upstreams.length + stages.length + downstreams.length)
var idx = 0
while (idx < upstreams.length) {
@ -132,7 +132,7 @@ object GraphInterpreterSpecKit {
inOwners: SMap[Inlet[_], GraphStageLogic],
outOwners: SMap[Outlet[_], GraphStageLogic]): Array[Connection] = {
val connections = Array.ofDim[Connection](connectedPorts.size)
val connections = new Array[Connection](connectedPorts.size)
connectedPorts.zipWithIndex.foreach {
case ((outlet, inlet), idx)