Skip to content

Commit 4678e50

Browse files
committed
Address comments; polish Prop to disallow setting null string value
1 parent 9b657fb commit 4678e50

File tree

7 files changed

+234
-228
lines changed

7 files changed

+234
-228
lines changed

library/src/scala/collection/convert/AsJavaConverters.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ import scala.{unchecked => uc}
2424

2525
/** Defines converter methods from Scala to Java collections.
2626
* These methods are available through the [[scala.jdk.javaapi.CollectionConverters]] object.
27-
*
28-
* Note: Both the parameter and the return type are non-nullable. However, if a null
29-
* reference is passed explicitly, this method will still return null. We intentionally
30-
* keep this signature to discourage passing nulls implicitly while preserving the
31-
* previous behavior for backward compatibility.
3227
*/
3328
trait AsJavaConverters {
3429
import JavaCollectionWrappers._
3530

31+
// Note: Both the parameter and the return type of the methods in this class are non-nullable.
32+
// However, if a null reference is passed explicitly, the method will still return null.
33+
// We intentionally keep this signature to discourage passing nulls implicitly while preserving the
34+
// previous behavior for backward compatibility.
35+
3636
/**
3737
* Converts a Scala `Iterator` to a Java `Iterator`.
3838
*

library/src/scala/collection/convert/AsScalaConverters.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ import scala.{unchecked => uc}
2525

2626
/** Defines converter methods from Java to Scala collections.
2727
* These methods are available through the [[scala.jdk.javaapi.CollectionConverters]] object.
28-
*
29-
* Note: Both the parameter and the return type are non-nullable. However, if a null
30-
* reference is passed explicitly, this method will still return null. We intentionally
31-
* keep this signature to discourage passing nulls implicitly while preserving the
32-
* previous behavior for backward compatibility.
3328
*/
3429
trait AsScalaConverters {
3530
import JavaCollectionWrappers._
3631

32+
// Note: Both the parameter and the return type of the methods in this class are non-nullable.
33+
// However, if a null reference is passed explicitly, the method will still return null.
34+
// We intentionally keep this signature to discourage passing nulls implicitly while preserving the
35+
// previous behavior for backward compatibility.
36+
3737
/**
3838
* Converts a Java `Iterator` to a Scala `Iterator`.
3939
*

0 commit comments

Comments
 (0)