@@ -45,7 +45,7 @@ trait AsJavaConverters {
4545 * @param i The Scala `Iterator` to be converted.
4646 * @return A Java `Iterator` view of the argument.
4747 */
48- def asJava [A ](i : Iterator [A ]): ju.Iterator [A ] = i match {
48+ def asJava [A ](i : Iterator [A ]): ju.Iterator [A ] = ( i : Iterator [ A ] | Null ) match {
4949 case null => null .asInstanceOf [ju.Iterator [A ]]
5050 case wrapper : JIteratorWrapper [A @ uc] => wrapper.underlying
5151 case _ => new IteratorWrapper (i)
@@ -63,7 +63,7 @@ trait AsJavaConverters {
6363 * @param i The Scala `Iterator` to be converted.
6464 * @return A Java `Enumeration` view of the argument.
6565 */
66- def asJavaEnumeration [A ](i : Iterator [A ]): ju.Enumeration [A ] = i match {
66+ def asJavaEnumeration [A ](i : Iterator [A ]): ju.Enumeration [A ] = ( i : Iterator [ A ] | Null ) match {
6767 case null => null .asInstanceOf [ju.Enumeration [A ]]
6868 case wrapper : JEnumerationWrapper [A @ uc] => wrapper.underlying
6969 case _ => new IteratorWrapper (i)
@@ -81,7 +81,7 @@ trait AsJavaConverters {
8181 * @param i The Scala `Iterable` to be converted.
8282 * @return A Java `Iterable` view of the argument.
8383 */
84- def asJava [A ](i : Iterable [A ]): jl.Iterable [A ] = i match {
84+ def asJava [A ](i : Iterable [A ]): jl.Iterable [A ] = ( i : Iterable [ A ] | Null ) match {
8585 case null => null .asInstanceOf [jl.Iterable [A ]]
8686 case wrapper : JIterableWrapper [A @ uc] => wrapper.underlying
8787 case _ => new IterableWrapper (i)
@@ -96,7 +96,7 @@ trait AsJavaConverters {
9696 * @param i The Scala `Iterable` to be converted.
9797 * @return A Java `Collection` view of the argument.
9898 */
99- def asJavaCollection [A ](i : Iterable [A ]): ju.Collection [A ] = i match {
99+ def asJavaCollection [A ](i : Iterable [A ]): ju.Collection [A ] = ( i : Iterable [ A ] | Null ) match {
100100 case null => null .asInstanceOf [ju.Collection [A ]]
101101 case wrapper : JCollectionWrapper [A @ uc] => wrapper.underlying
102102 case _ => new IterableWrapper (i)
@@ -114,7 +114,7 @@ trait AsJavaConverters {
114114 * @param b The Scala `Buffer` to be converted.
115115 * @return A Java `List` view of the argument.
116116 */
117- def asJava [A ](b : mutable.Buffer [A ]): ju.List [A ] = b match {
117+ def asJava [A ](b : mutable.Buffer [A ]): ju.List [A ] = ( b : mutable. Buffer [ A ] | Null ) match {
118118 case null => null .asInstanceOf [ju.List [A ]]
119119 case wrapper : JListWrapper [A @ uc] => wrapper.underlying
120120 case _ => new MutableBufferWrapper (b)
@@ -132,7 +132,7 @@ trait AsJavaConverters {
132132 * @param s The Scala `Seq` to be converted.
133133 * @return A Java `List` view of the argument.
134134 */
135- def asJava [A ](s : mutable.Seq [A ]): ju.List [A ] = s match {
135+ def asJava [A ](s : mutable.Seq [A ]): ju.List [A ] = ( s : mutable. Seq [ A ] | Null ) match {
136136 case null => null .asInstanceOf [ju.List [A ]]
137137 case wrapper : JListWrapper [A @ uc] => wrapper.underlying
138138 case _ => new MutableSeqWrapper (s)
@@ -150,7 +150,7 @@ trait AsJavaConverters {
150150 * @param s The Scala `Seq` to be converted.
151151 * @return A Java `List` view of the argument.
152152 */
153- def asJava [A ](s : Seq [A ]): ju.List [A ] = s match {
153+ def asJava [A ](s : Seq [A ]): ju.List [A ] = ( s : Seq [ A ] | Null ) match {
154154 case null => null .asInstanceOf [ju.List [A ]]
155155 case wrapper : JListWrapper [A @ uc] => wrapper.underlying
156156 case _ => new SeqWrapper (s)
@@ -168,7 +168,7 @@ trait AsJavaConverters {
168168 * @param s The Scala mutable `Set` to be converted.
169169 * @return A Java `Set` view of the argument.
170170 */
171- def asJava [A ](s : mutable.Set [A ]): ju.Set [A ] = s match {
171+ def asJava [A ](s : mutable.Set [A ]): ju.Set [A ] = ( s : mutable. Set [ A ] | Null ) match {
172172 case null => null .asInstanceOf [ju.Set [A ]]
173173 case wrapper : JSetWrapper [A @ uc] => wrapper.underlying
174174 case _ => new MutableSetWrapper (s)
@@ -186,7 +186,7 @@ trait AsJavaConverters {
186186 * @param s The Scala `Set` to be converted.
187187 * @return A Java `Set` view of the argument.
188188 */
189- def asJava [A ](s : Set [A ]): ju.Set [A ] = s match {
189+ def asJava [A ](s : Set [A ]): ju.Set [A ] = ( s : Set [ A ] | Null ) match {
190190 case null => null .asInstanceOf [ju.Set [A ]]
191191 case wrapper : JSetWrapper [A @ uc] => wrapper.underlying
192192 case _ => new SetWrapper (s)
@@ -204,7 +204,7 @@ trait AsJavaConverters {
204204 * @param m The Scala mutable `Map` to be converted.
205205 * @return A Java `Map` view of the argument.
206206 */
207- def asJava [K , V ](m : mutable.Map [K , V ]): ju.Map [K , V ] = m match {
207+ def asJava [K , V ](m : mutable.Map [K , V ]): ju.Map [K , V ] = ( m : mutable. Map [ K , V ] | Null ) match {
208208 case null => null .asInstanceOf [ju.Map [K , V ]]
209209 case wrapper : JMapWrapper [K @ uc, V @ uc] => wrapper.underlying
210210 case _ => new MutableMapWrapper (m)
@@ -223,7 +223,7 @@ trait AsJavaConverters {
223223 * @param m The Scala `Map` to be converted.
224224 * @return A Java `Dictionary` view of the argument.
225225 */
226- def asJavaDictionary [K , V ](m : mutable.Map [K , V ]): ju.Dictionary [K , V ] = m match {
226+ def asJavaDictionary [K , V ](m : mutable.Map [K , V ]): ju.Dictionary [K , V ] = ( m : mutable. Map [ K , V ] | Null ) match {
227227 case null => null .asInstanceOf [ju.Dictionary [K , V ]]
228228 case wrapper : JDictionaryWrapper [K @ uc, V @ uc] => wrapper.underlying
229229 case _ => new DictionaryWrapper (m)
@@ -241,7 +241,7 @@ trait AsJavaConverters {
241241 * @param m The Scala `Map` to be converted.
242242 * @return A Java `Map` view of the argument.
243243 */
244- def asJava [K , V ](m : Map [K , V ]): ju.Map [K , V ] = m match {
244+ def asJava [K , V ](m : Map [K , V ]): ju.Map [K , V ] = ( m : Map [ K , V ] | Null ) match {
245245 case null => null .asInstanceOf [ju.Map [K , V ]]
246246 case wrapper : JMapWrapper [K @ uc, V @ uc] => wrapper.underlying
247247 case _ => new MapWrapper (m)
@@ -260,7 +260,7 @@ trait AsJavaConverters {
260260 * @param m The Scala `concurrent.Map` to be converted.
261261 * @return A Java `ConcurrentMap` view of the argument.
262262 */
263- def asJava [K , V ](m : concurrent.Map [K , V ]): juc.ConcurrentMap [K , V ] = m match {
263+ def asJava [K , V ](m : concurrent.Map [K , V ]): juc.ConcurrentMap [K , V ] = ( m : concurrent. Map [ K , V ] | Null ) match {
264264 case null => null .asInstanceOf [juc.ConcurrentMap [K , V ]]
265265 case wrapper : JConcurrentMapWrapper [K @ uc, V @ uc] => wrapper.underlying
266266 case _ => new ConcurrentMapWrapper (m)
0 commit comments