Skip to content

Commit f2ef977

Browse files
committed
Remove some unnecessary .nn
1 parent d8f6684 commit f2ef977

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

library/src/scala/collection/convert/StreamExtensions.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ trait StreamExtensions {
272272
else if (info.companion == LongAccumulator) stream.asInstanceOf[Stream[Long]].collect(LongAccumulator.supplier, LongAccumulator.boxedAdder, LongAccumulator.merger).asInstanceOf[C1]
273273
else if (info.companion == DoubleAccumulator) stream.asInstanceOf[Stream[Double]].collect(DoubleAccumulator.supplier, DoubleAccumulator.boxedAdder, DoubleAccumulator.merger).asInstanceOf[C1]
274274
else if (stream.isParallel) anyAcc.to(factory)
275-
else factory.fromSpecific(stream.iterator.asScala.nn)
275+
else factory.fromSpecific(stream.iterator.asScala)
276276
}
277277

278278
/** Convert a generic Java Stream wrapping a primitive type to a corresponding primitive
@@ -304,7 +304,7 @@ trait StreamExtensions {
304304
if (info.companion == AnyAccumulator) stream.collect(AnyAccumulator.supplier[Int], AnyAccumulator.unboxedIntAdder, AnyAccumulator.merger[Int]).asInstanceOf[C1]
305305
else if (info.companion == IntAccumulator) intAcc.asInstanceOf[C1]
306306
else if (stream.isParallel) intAcc.to(factory)
307-
else factory.fromSpecific(stream.iterator.asInstanceOf[java.util.Iterator[Int]].asScala.nn)
307+
else factory.fromSpecific(stream.iterator.asInstanceOf[java.util.Iterator[Int]].asScala)
308308
}
309309
}
310310

@@ -331,7 +331,7 @@ trait StreamExtensions {
331331
if (info.companion == AnyAccumulator) stream.collect(AnyAccumulator.supplier[Long], AnyAccumulator.unboxedLongAdder, AnyAccumulator.merger[Long]).asInstanceOf[C1]
332332
else if (info.companion == LongAccumulator) longAcc.asInstanceOf[C1]
333333
else if (stream.isParallel) longAcc.to(factory)
334-
else factory.fromSpecific(stream.iterator.asInstanceOf[java.util.Iterator[Long]].asScala.nn)
334+
else factory.fromSpecific(stream.iterator.asInstanceOf[java.util.Iterator[Long]].asScala)
335335
}
336336
}
337337

@@ -358,7 +358,7 @@ trait StreamExtensions {
358358
if (info.companion == AnyAccumulator) stream.collect(AnyAccumulator.supplier[Double], AnyAccumulator.unboxedDoubleAdder, AnyAccumulator.merger[Double]).asInstanceOf[C1]
359359
else if (info.companion == DoubleAccumulator) doubleAcc.asInstanceOf[C1]
360360
else if (stream.isParallel) doubleAcc.to(factory)
361-
else factory.fromSpecific(stream.iterator.asInstanceOf[java.util.Iterator[Double]].asScala.nn)
361+
else factory.fromSpecific(stream.iterator.asInstanceOf[java.util.Iterator[Double]].asScala)
362362
}
363363
}
364364
}

library/src/scala/collection/immutable/RedBlackTree.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -928,15 +928,15 @@ private[collection] object RedBlackTree {
928928
}
929929
}
930930
private[this] class EntriesIterator[A: Ordering, B](tree: Tree[A, B] | Null, focus: Option[A]) extends TreeIterator[A, B, (A, B)](tree, focus) {
931-
override def nextResult(tree: Tree[A, B]) = (tree.nn.key, tree.nn.value)
931+
override def nextResult(tree: Tree[A, B]) = (tree.key, tree.value)
932932
}
933933

934934
private[this] class KeysIterator[A: Ordering, B](tree: Tree[A, B] | Null, focus: Option[A]) extends TreeIterator[A, B, A](tree, focus) {
935-
override def nextResult(tree: Tree[A, B]) = tree.nn.key
935+
override def nextResult(tree: Tree[A, B]) = tree.key
936936
}
937937

938938
private[this] class ValuesIterator[A: Ordering, B](tree: Tree[A, B] | Null, focus: Option[A]) extends TreeIterator[A, B, B](tree, focus) {
939-
override def nextResult(tree: Tree[A, B]) = tree.nn.value
939+
override def nextResult(tree: Tree[A, B]) = tree.value
940940
}
941941

942942
/** Build a Tree suitable for a TreeSet from an ordered sequence of keys */

library/src/scala/sys/package.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ package object sys {
6565
*
6666
* @return a Map containing the system environment variables.
6767
*/
68-
def env: Map[String, String] = Map.from(System.getenv().asScala.nn).withDefault { v =>
68+
def env: Map[String, String] = Map.from(System.getenv().asScala).withDefault { v =>
6969
val s = System.getenv(v)
7070
if (s == null) throw new NoSuchElementException(v)
7171
s
@@ -93,6 +93,6 @@ package object sys {
9393
val tarray = new Array[Thread](num)
9494
val got = Thread.enumerate(tarray)
9595

96-
ArraySeq.unsafeWrapArray(tarray).nn.take(got)
96+
ArraySeq.unsafeWrapArray(tarray).take(got)
9797
}
9898
}

0 commit comments

Comments
 (0)