@@ -45,7 +45,7 @@ trait AsJavaConverters {
45
45
* @param i The Scala `Iterator` to be converted.
46
46
* @return A Java `Iterator` view of the argument.
47
47
*/
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 {
49
49
case null => null .asInstanceOf [ju.Iterator [A ]]
50
50
case wrapper : JIteratorWrapper [A @ uc] => wrapper.underlying
51
51
case _ => new IteratorWrapper (i)
@@ -63,7 +63,7 @@ trait AsJavaConverters {
63
63
* @param i The Scala `Iterator` to be converted.
64
64
* @return A Java `Enumeration` view of the argument.
65
65
*/
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 {
67
67
case null => null .asInstanceOf [ju.Enumeration [A ]]
68
68
case wrapper : JEnumerationWrapper [A @ uc] => wrapper.underlying
69
69
case _ => new IteratorWrapper (i)
@@ -81,7 +81,7 @@ trait AsJavaConverters {
81
81
* @param i The Scala `Iterable` to be converted.
82
82
* @return A Java `Iterable` view of the argument.
83
83
*/
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 {
85
85
case null => null .asInstanceOf [jl.Iterable [A ]]
86
86
case wrapper : JIterableWrapper [A @ uc] => wrapper.underlying
87
87
case _ => new IterableWrapper (i)
@@ -96,7 +96,7 @@ trait AsJavaConverters {
96
96
* @param i The Scala `Iterable` to be converted.
97
97
* @return A Java `Collection` view of the argument.
98
98
*/
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 {
100
100
case null => null .asInstanceOf [ju.Collection [A ]]
101
101
case wrapper : JCollectionWrapper [A @ uc] => wrapper.underlying
102
102
case _ => new IterableWrapper (i)
@@ -114,7 +114,7 @@ trait AsJavaConverters {
114
114
* @param b The Scala `Buffer` to be converted.
115
115
* @return A Java `List` view of the argument.
116
116
*/
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 {
118
118
case null => null .asInstanceOf [ju.List [A ]]
119
119
case wrapper : JListWrapper [A @ uc] => wrapper.underlying
120
120
case _ => new MutableBufferWrapper (b)
@@ -132,7 +132,7 @@ trait AsJavaConverters {
132
132
* @param s The Scala `Seq` to be converted.
133
133
* @return A Java `List` view of the argument.
134
134
*/
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 {
136
136
case null => null .asInstanceOf [ju.List [A ]]
137
137
case wrapper : JListWrapper [A @ uc] => wrapper.underlying
138
138
case _ => new MutableSeqWrapper (s)
@@ -150,7 +150,7 @@ trait AsJavaConverters {
150
150
* @param s The Scala `Seq` to be converted.
151
151
* @return A Java `List` view of the argument.
152
152
*/
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 {
154
154
case null => null .asInstanceOf [ju.List [A ]]
155
155
case wrapper : JListWrapper [A @ uc] => wrapper.underlying
156
156
case _ => new SeqWrapper (s)
@@ -168,7 +168,7 @@ trait AsJavaConverters {
168
168
* @param s The Scala mutable `Set` to be converted.
169
169
* @return A Java `Set` view of the argument.
170
170
*/
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 {
172
172
case null => null .asInstanceOf [ju.Set [A ]]
173
173
case wrapper : JSetWrapper [A @ uc] => wrapper.underlying
174
174
case _ => new MutableSetWrapper (s)
@@ -186,7 +186,7 @@ trait AsJavaConverters {
186
186
* @param s The Scala `Set` to be converted.
187
187
* @return A Java `Set` view of the argument.
188
188
*/
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 {
190
190
case null => null .asInstanceOf [ju.Set [A ]]
191
191
case wrapper : JSetWrapper [A @ uc] => wrapper.underlying
192
192
case _ => new SetWrapper (s)
@@ -204,7 +204,7 @@ trait AsJavaConverters {
204
204
* @param m The Scala mutable `Map` to be converted.
205
205
* @return A Java `Map` view of the argument.
206
206
*/
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 {
208
208
case null => null .asInstanceOf [ju.Map [K , V ]]
209
209
case wrapper : JMapWrapper [K @ uc, V @ uc] => wrapper.underlying
210
210
case _ => new MutableMapWrapper (m)
@@ -223,7 +223,7 @@ trait AsJavaConverters {
223
223
* @param m The Scala `Map` to be converted.
224
224
* @return A Java `Dictionary` view of the argument.
225
225
*/
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 {
227
227
case null => null .asInstanceOf [ju.Dictionary [K , V ]]
228
228
case wrapper : JDictionaryWrapper [K @ uc, V @ uc] => wrapper.underlying
229
229
case _ => new DictionaryWrapper (m)
@@ -241,7 +241,7 @@ trait AsJavaConverters {
241
241
* @param m The Scala `Map` to be converted.
242
242
* @return A Java `Map` view of the argument.
243
243
*/
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 {
245
245
case null => null .asInstanceOf [ju.Map [K , V ]]
246
246
case wrapper : JMapWrapper [K @ uc, V @ uc] => wrapper.underlying
247
247
case _ => new MapWrapper (m)
@@ -260,7 +260,7 @@ trait AsJavaConverters {
260
260
* @param m The Scala `concurrent.Map` to be converted.
261
261
* @return A Java `ConcurrentMap` view of the argument.
262
262
*/
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 {
264
264
case null => null .asInstanceOf [juc.ConcurrentMap [K , V ]]
265
265
case wrapper : JConcurrentMapWrapper [K @ uc, V @ uc] => wrapper.underlying
266
266
case _ => new ConcurrentMapWrapper (m)
0 commit comments