@@ -320,7 +320,7 @@ public static Flux<DataBuffer> write(Publisher<DataBuffer> source, AsynchronousF
320
320
* writing errors and the completion signal
321
321
*/
322
322
public static Flux <DataBuffer > write (
323
- Publisher <DataBuffer > source , AsynchronousFileChannel channel , long position ) {
323
+ Publisher <? extends DataBuffer > source , AsynchronousFileChannel channel , long position ) {
324
324
325
325
Assert .notNull (source , "'source' must not be null" );
326
326
Assert .notNull (channel , "'channel' must not be null" );
@@ -332,8 +332,19 @@ public static Flux<DataBuffer> write(
332
332
sink .onDispose (handler );
333
333
flux .subscribe (handler );
334
334
});
335
+
336
+
337
+ }
338
+
339
+ public void handle () {
340
+ Number n = 5 ;
341
+ inspect (n );
335
342
}
336
343
344
+ public <U extends Number > void inspect (U u ){
345
+ }
346
+
347
+
337
348
/**
338
349
* Write the given stream of {@link DataBuffer DataBuffers} to the given
339
350
* file {@link Path}. The optional {@code options} parameter specifies
@@ -409,7 +420,7 @@ static void closeChannel(@Nullable Channel channel) {
409
420
* @param maxByteCount the maximum byte count
410
421
* @return a flux whose maximum byte count is {@code maxByteCount}
411
422
*/
412
- public static Flux <DataBuffer > takeUntilByteCount (Publisher <DataBuffer > publisher , long maxByteCount ) {
423
+ public static Flux <DataBuffer > takeUntilByteCount (Publisher <? extends DataBuffer > publisher , long maxByteCount ) {
413
424
Assert .notNull (publisher , "Publisher must not be null" );
414
425
Assert .isTrue (maxByteCount >= 0 , "'maxByteCount' must be a positive number" );
415
426
@@ -440,7 +451,7 @@ public static Flux<DataBuffer> takeUntilByteCount(Publisher<DataBuffer> publishe
440
451
* @param maxByteCount the maximum byte count
441
452
* @return a flux with the remaining part of the given publisher
442
453
*/
443
- public static Flux <DataBuffer > skipUntilByteCount (Publisher <DataBuffer > publisher , long maxByteCount ) {
454
+ public static Flux <DataBuffer > skipUntilByteCount (Publisher <? extends DataBuffer > publisher , long maxByteCount ) {
444
455
Assert .notNull (publisher , "Publisher must not be null" );
445
456
Assert .isTrue (maxByteCount >= 0 , "'maxByteCount' must be a positive number" );
446
457
@@ -520,7 +531,8 @@ public static Consumer<DataBuffer> releaseConsumer() {
520
531
* @return a buffer that is composed from the {@code dataBuffers} argument
521
532
* @since 5.0.3
522
533
*/
523
- public static Mono <DataBuffer > join (Publisher <DataBuffer > dataBuffers ) {
534
+ @ SuppressWarnings ("unchecked" )
535
+ public static Mono <DataBuffer > join (Publisher <? extends DataBuffer > dataBuffers ) {
524
536
Assert .notNull (dataBuffers , "'dataBuffers' must not be null" );
525
537
526
538
if (dataBuffers instanceof Mono ) {
0 commit comments