anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: tony19/logback-android
Issue: Daily rollover uses UTC instead of local time

## Description
I configured daily rollover with TimeBasedRollingPolicy, according to example in [wiki](https://github.com/tony19/logback-android/wiki/Appender-Notes#configuration-in-code). It generally works, but rollover happens at UTC midnight, not local midnight. This may be confusing.

I know it's possible to specify time zone explicitly, but I suppose local time should be used by default, like it was in older versions (e.g. 1.1.1).

Maybe the same issue was reported at #198.

## Steps to reproduce

1. Checkout [sample project](https://github.com/gmk57/TestLogback)
1. Configure GMT+3 time zone on device or emulator
1. Leave app running overnight
1. log.txt contains events since 3:00, not 0:00

## Environment

* **`logback-android` version:** 2.0.0
* **Android version:** 5.1, 6.0
* **Platform:** devices, emulator

Changed files:
logback-android/src/main/java/ch/qos/logback/core/rolling/helper/RollingCalendar.java
logback-android/src/test/java/ch/qos/logback/core/rolling/helper/RollingCalendarTest.java

diff --git a/logback-android/src/main/java/ch/qos/logback/core/rolling/helper/RollingCalendar.java b/logback-android/src/main/java/ch/qos/logback/core/rolling/helper/RollingCalendar.java
index 2d461e535..d94336e94 100644
--- a/logback-android/src/main/java/ch/qos/logback/core/rolling/helper/RollingCalendar.java
+++ b/logback-android/src/main/java/ch/qos/logback/core/rolling/helper/RollingCalendar.java
@@ -72,7 +72,9 @@ public class RollingCalendar extends GregorianCalendar {
   }
 
   public RollingCalendar(String datePattern) {
-    this(datePattern, GMT_TIMEZONE, Locale.US);
+    super();
+    this.datePattern = datePattern;
+    this.periodicityType = computePeriodicityType();
   }
 
   public RollingCalendar(String datePattern, TimeZone tz, Locale locale) {
diff --git a/logback-android/src/test/java/ch/qos/logback/core/rolling/helper/RollingCalendarTest.java b/logback-android/src/test/java/ch/qos/logback/core/rolling/helper/RollingCalendarTest.java
index 42578f15d..4ac32b39e 100644
--- a/logback-android/src/test/java/ch/qos/logback/core/rolling/helper/RollingCalendarTest.java
+++ b/logback-android/src/test/java/ch/qos/logback/core/rolling/helper/RollingCalendarTest.java
@@ -90,7 +90,7 @@ public class RollingCalendarTest {
   }
 
   private Calendar getEndOfNextNthPeriod(String dateFormat, Date date, int n) {
-    RollingCalendar rc = new RollingCalendar(dateFormat);
+    RollingCalendar rc = new RollingCalendar(dateFormat, GMT_TIMEZONE, Locale.US);
     Date nextDate = rc.getEndOfNextNthPeriod(date, n);
     Calendar cal = Calendar.getInstance(GMT_TIMEZONE, Locale.US);
     cal.setTime(nextDate);
@@ -242,4 +242,4 @@ public class RollingCalendarTest {
       assertFalse(rc.isCollisionFree());
     }
   }
-}
\\ No newline at end of file
+}
Repository: javers/javers
Issue: JaVers dependency on Google Guava

As documented I just ran the below code to view the diff. It seems that Google Guava is required as a runtime dependency for the below code to work.

```java
Javers javers = JaversBuilder.javers().build();
Person tommyOld = new Person("tommy", "Tommy Smart");
Person tommyNew = new Person("tommy", "Tommy C. Smart");

Diff diff = javers.compare(tommyOld, tommyNew);
System.out.println(diff.prettyPrint());
```
The code above throws an exception as shown below:

```
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap
	at org.javers.core.Changes.<init>(Changes.java:35)
	at org.javers.core.diff.Diff.groupByObject(Diff.java:88)
	at org.javers.core.diff.Diff.toString(Diff.java:129)
	at org.javers.core.diff.Diff.prettyPrint(Diff.java:120)
	...
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 5 more
```

Not sure how the below line of code is used in [org.javers.core.Changes.java](https://github.com/javers/javers/blob/d5ac085c94b5459d464a14ab3e489f31e3c7c110/javers-core/src/main/java/org/javers/core/Changes.java#L35)
There are 3 more references in other classes HibernateConfig.java, JaversSpringJpaApplicationConfig.java and JaversSpringMongoApplicationConfig.java

The above code can be easily replaced with standard Java code to remove dependency on Goolge Guava.

Do let me know if these changes can be done. I will submit a PR.

Changed files:
javers-core/src/main/java/org/javers/common/collections/Primitives.java

diff --git a/javers-core/src/main/java/org/javers/common/collections/Primitives.java b/javers-core/src/main/java/org/javers/common/collections/Primitives.java
index eee8a3c4..c9ff294d 100644
--- a/javers-core/src/main/java/org/javers/common/collections/Primitives.java
+++ b/javers-core/src/main/java/org/javers/common/collections/Primitives.java
@@ -1,10 +1,10 @@
 package org.javers.common.collections;
 
-import com.google.common.collect.Streams;
 import org.javers.common.reflection.ReflectionUtil;
 
 import java.util.List;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 /**
  * @author bartosz walacik
@@ -27,7 +27,7 @@ public class Primitives {
 
     public static List<Class<?>> getPrimitiveAndBoxTypes() {
         return java.util.Collections.unmodifiableList(
-                Streams.concat(PRIMITIVE_NUMBER_TYPES.stream(),
+                Stream.concat(PRIMITIVE_NUMBER_TYPES.stream(),
                                PRIMITIVE_TYPES.stream()).collect(Collectors.toList()));
     }
Repository: javers/javers
Issue: Possible issue with skip value check

While reading the code, I found this snippet on`master`:
https://github.com/javers/javers/blob/f49b0aea4c371b90ada54144843e3e1eae81fe65/javers-core/src/main/java/org/javers/repository/api/QueryParamsBuilder.java#L111
```
public QueryParamsBuilder skip(int skip) {
        Validate.argumentCheck(limit >= 0, "Skip is not a non-negative number.");
        this.skip = skip;
        return this;
    }
```

Shouldn't it be `        Validate.argumentCheck(skip >= 0, "Skip is not a non-negative number.");` ?

Changed files:
javers-core/src/main/java/org/javers/repository/api/QueryParamsBuilder.java

diff --git a/javers-core/src/main/java/org/javers/repository/api/QueryParamsBuilder.java b/javers-core/src/main/java/org/javers/repository/api/QueryParamsBuilder.java
index 24122e34..a46ad839 100644
--- a/javers-core/src/main/java/org/javers/repository/api/QueryParamsBuilder.java
+++ b/javers-core/src/main/java/org/javers/repository/api/QueryParamsBuilder.java
@@ -108,7 +108,7 @@ public class QueryParamsBuilder {
      * @see QueryBuilder#skip(int)
      */
     public QueryParamsBuilder skip(int skip) {
-        Validate.argumentCheck(limit >= 0, "Skip is not a non-negative number.");
+        Validate.argumentCheck(skip >= 0, "Skip is not a non-negative number.");
         this.skip = skip;
         return this;
     }
Repository: javers/javers
Issue: ClassNotFoundException when using javers-persistence-sql and gson 2.9.0

**Clear description of my expectations versus reality**
I'm using javers with javers-persistence-sql and expected that updating gson from 2.8.9 to 2.9.0 wouldn't do any harm.
But using gson 2.9.0 will result in 
```
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gson/internal/LinkedHashTreeMap
	at org.javers.repository.sql.schema.FixedSchemaFactory.allTablesSchema(FixedSchemaFactory.java:54)
	at org.javers.repository.sql.schema.JaversSchemaManager.ensureSchema(JaversSchemaManager.java:46)
	at org.javers.repository.sql.JaversSqlRepository.ensureSchema(JaversSqlRepository.java:186)
	at org.javers.core.JaversBuilder.build(JaversBuilder.java:133)
Caused by: java.lang.ClassNotFoundException: com.google.gson.internal.LinkedHashTreeMap
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
	... 10 more
```
...


**Steps To Reproduce**
Update gson to 2.9.0 and call JaversBuilder.build

**Javers' Version**
6.6.2


**Additional context**
As stated in in https://github.com/google/gson/releases/tag/gson-parent-2.9.0 LinkedHashTreeMap is removed from gson but is used in javers-persistence-sql here https://github.com/javers/javers/blob/javers-6.6.2/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/FixedSchemaFactory.java
...


Changed files:
javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/FixedSchemaFactory.java

diff --git a/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/FixedSchemaFactory.java b/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/FixedSchemaFactory.java
index ea6c93b1..7d5a99a0 100644
--- a/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/FixedSchemaFactory.java
+++ b/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/FixedSchemaFactory.java
@@ -1,12 +1,12 @@
 package org.javers.repository.sql.schema;
 
-import com.google.gson.internal.LinkedHashTreeMap;
 import org.polyjdbc.core.dialect.*;
 import org.polyjdbc.core.schema.model.LongAttributeBuilder;
 import org.polyjdbc.core.schema.model.RelationBuilder;
 import org.polyjdbc.core.schema.model.Schema;
 import org.polyjdbc.core.util.StringUtils;
 
+import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -51,7 +51,7 @@ public class FixedSchemaFactory extends SchemaNameAware {
     }
 
     Map<String, Schema> allTablesSchema(Dialect dialect) {
-        Map<String, Schema> schema = new LinkedHashTreeMap<>();
+        Map<String, Schema> schema = new HashMap<>();
 
         schema.put(getGlobalIdTableName().localName(), globalIdTableSchema(dialect));
         schema.put(getCommitTableName().localName(),    commitTableSchema(dialect));
Repository: netflix/hollow
Issue: Ergonomic HollowObjectDelegateCachedImpls refer to object ordinal

Looks like the problem is here:

https://github.com/Netflix/hollow/blob/f0126b04575a897b3e7ceefa07baa0f354b79683/hollow/src/main/java/com/netflix/hollow/api/codegen/delegate/HollowObjectDelegateCachedImplGenerator.java#L131

For a `String` field I get:
```
        this.nameOrdinal = typeAPI.getNameOrdinal(ordinal);
        int nameTempOrdinal = typeAPI.getNameOrdinal(ordinal);
        this.name = nameTempOrdinal == -1 ? null : typeAPI.getAPI().getStringTypeAPI().getValue(ordinal);
```

Also seems that `TempOrdinal` is unnecessary, and the generator could refer to the field. Edit: Ah, looks like they're for shortcut paths with more than one length. Still could conditionalize on the path length to avoid the double lookup I guess.

Changed files:
hollow/src/main/java/com/netflix/hollow/api/codegen/delegate/HollowObjectDelegateCachedImplGenerator.java

diff --git a/hollow/src/main/java/com/netflix/hollow/api/codegen/delegate/HollowObjectDelegateCachedImplGenerator.java b/hollow/src/main/java/com/netflix/hollow/api/codegen/delegate/HollowObjectDelegateCachedImplGenerator.java
index 1692f5910..d1631fe27 100644
--- a/hollow/src/main/java/com/netflix/hollow/api/codegen/delegate/HollowObjectDelegateCachedImplGenerator.java
+++ b/hollow/src/main/java/com/netflix/hollow/api/codegen/delegate/HollowObjectDelegateCachedImplGenerator.java
@@ -128,7 +128,7 @@ public class HollowObjectDelegateCachedImplGenerator extends HollowObjectDelegat
                     }
 
                     String typeAPIName = HollowCodeGenerationUtils.typeAPIClassname(shortcut.getPathTypes()[shortcut.getPathTypes().length-1]);
-                    builder.append("        this.").append(fieldName).append(" = ").append(ordinalVariableName).append(" == -1 ? null : ").append("typeAPI.getAPI().get").append(typeAPIName).append("().get").append(uppercase(shortcut.getPath()[shortcut.getPath().length-1])).append("(ordinal);\\n");
+                    builder.append("        this.").append(fieldName).append(" = ").append(ordinalVariableName).append(" == -1 ? null : ").append("typeAPI.getAPI().get").append(typeAPIName).append("().get").append(uppercase(shortcut.getPath()[shortcut.getPath().length-1])).append("(").append(ordinalVariableName).append(");\\n");
                 }
             }
         }
Repository: netflix/hollow
Issue: PrimaryKeyIndex doesn't index large changes efficiently

It's intended for `PrimaryKeyIndex` to do a full re-index when more than 10% of the previous ordinals have been removed (record removed or modified).

A [bug in the code (HollowPrimaryKeyIndex.java#L582)](https://github.com/Netflix/hollow/blob/240417b373d1b6aeead886152603201cbbd01fc2/hollow/src/main/java/com/netflix/hollow/core/index/HollowPrimaryKeyIndex.java#L582) prevents the `> 10%` condition from ever being true. Thus the index always follows the delta update logic regardless of the relative magnitude of changes.

```
BitSet previousOrdinals = typeState.getListener(…).getPopulatedOrdinals();
                                                   ^ should be getPreviousOrdinals()
BitSet ordinals = typeState.getListener(…).getPopulatedOrdinals();
```

Changed files:
hollow/src/main/java/com/netflix/hollow/core/index/HollowPrimaryKeyIndex.java

diff --git a/hollow/src/main/java/com/netflix/hollow/core/index/HollowPrimaryKeyIndex.java b/hollow/src/main/java/com/netflix/hollow/core/index/HollowPrimaryKeyIndex.java
index e6dc2cc7d..525fe3d1a 100644
--- a/hollow/src/main/java/com/netflix/hollow/core/index/HollowPrimaryKeyIndex.java
+++ b/hollow/src/main/java/com/netflix/hollow/core/index/HollowPrimaryKeyIndex.java
@@ -579,7 +579,7 @@ public class HollowPrimaryKeyIndex implements HollowTypeStateListener {
     }
 
     private boolean shouldPerformDeltaUpdate() {
-        BitSet previousOrdinals = typeState.getListener(PopulatedOrdinalListener.class).getPopulatedOrdinals();
+        BitSet previousOrdinals = typeState.getListener(PopulatedOrdinalListener.class).getPreviousOrdinals();
         BitSet ordinals = typeState.getListener(PopulatedOrdinalListener.class).getPopulatedOrdinals();
 
         int prevCardinality = 0;
Repository: vert-x3/vertx-web
Issue: SecuritySchemeImpl returns null on bind call

### Version

4.1.5

### Context

When calling `RouterBuilder.securityScheme(String).bind(..)`  the returned Future always return null due to a `.mapEmpty()` call.


Changed files:
vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/SecuritySchemeImpl.java
vertx-web-openapi/src/test/java/io/vertx/ext/web/openapi/RouterBuilderSecurityHandlerTest.java

diff --git a/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/SecuritySchemeImpl.java b/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/SecuritySchemeImpl.java
index 2c8043fff..7df9cf046 100644
--- a/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/SecuritySchemeImpl.java
+++ b/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/SecuritySchemeImpl.java
@@ -40,7 +40,7 @@ public class SecuritySchemeImpl implements SecurityScheme {
       if (securitySchemes.containsKey(securitySchemeId)) {
         return factory.apply(securitySchemes.getJsonObject(securitySchemeId))
           .onSuccess(handler -> routerBuilder.securityHandler(securitySchemeId, handler))
-          .mapEmpty();
+          .map(routerBuilder);
       }
     }
     return
diff --git a/vertx-web-openapi/src/test/java/io/vertx/ext/web/openapi/RouterBuilderSecurityHandlerTest.java b/vertx-web-openapi/src/test/java/io/vertx/ext/web/openapi/RouterBuilderSecurityHandlerTest.java
index 80d90e15b..d11b9db9c 100644
--- a/vertx-web-openapi/src/test/java/io/vertx/ext/web/openapi/RouterBuilderSecurityHandlerTest.java
+++ b/vertx-web-openapi/src/test/java/io/vertx/ext/web/openapi/RouterBuilderSecurityHandlerTest.java
@@ -1,11 +1,15 @@
 package io.vertx.ext.web.openapi;
 
+import static org.assertj.core.api.Assertions.assertThat;
+
+import io.vertx.core.Future;
 import io.vertx.core.Vertx;
 import io.vertx.ext.web.handler.APIKeyHandler;
 import io.vertx.ext.web.handler.OAuth2AuthHandler;
 import io.vertx.junit5.Timeout;
 import io.vertx.junit5.VertxExtension;
 import io.vertx.junit5.VertxTestContext;
+import org.assertj.core.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 
@@ -68,4 +72,19 @@ public class RouterBuilderSecurityHandlerTest extends BaseRouterBuilderTest {
         }
       });
   }
+
+  @Test
+  public void asyncBindHandler(Vertx vertx, VertxTestContext testContext) {
+    RouterBuilder.create(vertx, SECURITY_TESTS)
+      .compose(routerBuilder ->
+        routerBuilder
+          .securityHandler("oauth")
+          .bind(config -> Future.succeededFuture(OAuth2AuthHandler.create(vertx, null)))
+      )
+      .onSuccess(routerBuilder -> {
+        testContext.verify(() -> assertThat(routerBuilder).isNotNull());
+        testContext.completeNow();
+      })
+      .onFailure(testContext::failNow);
+  }
 }
Repository: vert-x3/vertx-web
Issue: TenantHandler doesn't respect the order aware sub handler

See: https://github.com/eclipse-vertx/vert.x/issues/4536

A possible use case is to implement SSO on the same endpoint, for this the IdP info is extracted from a param, however, OAuth2Handler implements `OrderListener` and depends on this information to properly mount the callback.

On a Multi tenant environment, the order should be set to the handlers to avoid them being missed on the route.

Changed files:
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/MultiTenantHandlerImpl.java

diff --git a/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/MultiTenantHandlerImpl.java b/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/MultiTenantHandlerImpl.java
index ccf8e8f22..d8d75c14a 100644
--- a/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/MultiTenantHandlerImpl.java
+++ b/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/MultiTenantHandlerImpl.java
@@ -18,6 +18,7 @@ package io.vertx.ext.web.handler.impl;
 import io.vertx.core.Handler;
 import io.vertx.ext.web.RoutingContext;
 import io.vertx.ext.web.handler.MultiTenantHandler;
+import io.vertx.ext.web.impl.OrderListener;
 
 import java.util.Map;
 import java.util.Objects;
@@ -27,7 +28,7 @@ import java.util.function.Function;
 /**
  * @author <a href="http://pmlopes@gmail.com">Paulo Lopes</a>
  */
-public class MultiTenantHandlerImpl implements MultiTenantHandler {
+public class MultiTenantHandlerImpl implements MultiTenantHandler, OrderListener {
 
   private final Map<String, Handler<RoutingContext>> handlerMap = new ConcurrentHashMap<>();
 
@@ -87,4 +88,13 @@ public class MultiTenantHandlerImpl implements MultiTenantHandler {
       ctx.next();
     }
   }
+
+  @Override
+  public void onOrder(int order) {
+    for (Handler<RoutingContext> handler : handlerMap.values()) {
+      if (handler instanceof OrderListener) {
+        ((OrderListener) handler).onOrder(order);
+      }
+    }
+  }
 }
Repository: vert-x3/vertx-web
Issue: Log (LoggerHandlerImpl) swallows/loses log if client closes connection.

As discussed from: https://github.com/eclipse-vertx/vert.x/issues/3902

Version
3.9.x

Context
Log is not logged

Do you have a reproducer?
No.

Steps to reproduce
This is coming from conversation here: https://groups.google.com/g/vertx/c/CZaPXYk2MA0

Add LoggerHandlerImpl to your route as early as possible. Make sure immediate is false, so that the log gets loged at the end of the request to ensure that context.addBodyEndHandler(v -> log(context, timestamp, remoteClient, version, method, uri)); is used.

Have client connect and drop close the connection before response is returned.

Changed files:
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/LoggerHandlerImpl.java

diff --git a/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/LoggerHandlerImpl.java b/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/LoggerHandlerImpl.java
index 5a5c8ca2e..a521f1500 100755
--- a/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/LoggerHandlerImpl.java
+++ b/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/LoggerHandlerImpl.java
@@ -57,7 +57,6 @@ public class LoggerHandlerImpl implements LoggerHandler {
    */
   private final LoggerFormat format;
 
-  private Function<HttpServerRequest, String> customFormatter;
   private LoggerFormatter logFormatter;
 
   public LoggerHandlerImpl(boolean immediate, LoggerFormat format) {
@@ -147,11 +146,7 @@ public class LoggerHandlerImpl implements LoggerHandler {
         break;
       case CUSTOM:
         try {
-          if (logFormatter != null) {
-            message = logFormatter.format(context, (System.currentTimeMillis() - timestamp));
-          } else {
-            message = customFormatter.apply(request);
-          }
+          message = logFormatter.format(context, (System.currentTimeMillis() - timestamp));
         } catch (RuntimeException e) {
           // if an error happens at the user side
           // log it instead
@@ -183,7 +178,7 @@ public class LoggerHandlerImpl implements LoggerHandler {
     if (immediate) {
       log(context, timestamp, remoteClient, version, method, uri);
     } else {
-      context.addBodyEndHandler(v -> log(context, timestamp, remoteClient, version, method, uri));
+      context.addEndHandler(v -> log(context, timestamp, remoteClient, version, method, uri));
     }
 
     context.next();
Repository: vert-x3/vertx-web
Issue: Enable loading OpenAPI YAML from classpath

#### Feature Description

I'd like to load an OpenAPI YAML for router creation from a file that's bundled in a JAR. However, when using `getResource` to determine the URI to the bundled file, an exception is thrown:

```
io.vertx.ext.web.openapi.RouterBuilderException: Cannot load the spec in path file:/path/to/app.jar!/api/core_1.0.0.yaml
```

Ideally [RouterBuilder.create](https://vertx.io/docs/apidocs/io/vertx/ext/web/openapi/RouterBuilder.html#create-io.vertx.core.Vertx-java.lang.String-) should be adapted to be able to load any URI, even those pointing to files in the JAR.

#### Contribution

Not sure how much work this is. I'd think that it's something that can be implemented in a couple of minutes but maybe it needs some larger refactoring.
If it's not too much work, I'm open to get acquainted with the codebase and implement it. However I'd appreciate if someone could give me a few pointers on possible approaches.

Changed files:
vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/OpenAPIHolderImpl.java

diff --git a/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/OpenAPIHolderImpl.java b/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/OpenAPIHolderImpl.java
index c092f22bb..66cb0ebe1 100755
--- a/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/OpenAPIHolderImpl.java
+++ b/vertx-web-openapi/src/main/java/io/vertx/ext/web/openapi/impl/OpenAPIHolderImpl.java
@@ -375,6 +375,7 @@ public class OpenAPIHolderImpl implements OpenAPIHolder {
     try {
       switch (uri.getScheme()) {
         case "http":
+        case "https":
           return Paths.get(uri.getPath());
         case "file":
           return Paths.get(uri);
Repository: vert-x3/vertx-web
Issue: ParsableHeaderValue::parameter does not call ensureHeaderProcessed

`ParsableHeaderValue::parameter` does not call `ensureHeaderProcessed`. Because of this, the function will return `null` even though there is a parameter.

Same goes for `parameters`

Workaround is to call `value` first

Changed files:
vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableHeaderValue.java

diff --git a/vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableHeaderValue.java b/vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableHeaderValue.java
index 596d7071e..b46cdfd77 100644
--- a/vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableHeaderValue.java
+++ b/vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableHeaderValue.java
@@ -54,10 +54,12 @@ public class ParsableHeaderValue implements ParsedHeaderValue {
   }
 
   public String parameter(String key) {
+    ensureHeaderProcessed();
     return parameter.get(key);
   }
 
   public Map<String, String> parameters() {
+    ensureHeaderProcessed();
     return Collections.unmodifiableMap(parameter);
   }
Repository: vert-x3/vertx-web
Issue: ParsableMIMEValue - component() and subComponent() do not ensure the header is parsed

### Version

4.3.7

### Context

The `io.vertx.ext.web.impl.ParsableMIMEValue.component()` and `io.vertx.ext.web.impl.ParsableMIMEValue.subComponent()` methods do not call the `ensureHeaderProcessed()` method. As a result, these methods may return `null`.

A workaround exists: first call any other method that triggers parsing, e.g. `io.vertx.ext.web.impl.ParsableHeaderValue.value()`.

There is also `io.vertx.ext.web.impl.ParsableHeaderValue.forceParse()` but that's an implementation class, i.e. not part of the public API.


Changed files:
vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableMIMEValue.java

diff --git a/vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableMIMEValue.java b/vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableMIMEValue.java
index 01d24ed2f..dda7d80c9 100644
--- a/vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableMIMEValue.java
+++ b/vertx-web/src/main/java/io/vertx/ext/web/impl/ParsableMIMEValue.java
@@ -17,11 +17,13 @@ public class ParsableMIMEValue extends ParsableHeaderValue implements MIMEHeader
 
   @Override
   public String component() {
+    ensureHeaderProcessed();
     return component;
   }
 
   @Override
   public String subComponent() {
+    ensureHeaderProcessed();
     return subComponent;
   }
Repository: vert-x3/vertx-web
Issue: BodyHandler Requires TRANSFER-ENCODING to react

### Version

4.3.4 

### Context

https://netty.io/news/2022/09/08/4-1-81-Final.html

> Connection related headers in HTTP/2 frames are now rejected, in compliance with the specification 

It is no longer allowed to set TRANSFER-ENCODING chunked on HTTP2 connections but we are currently doing this to allow BodyHandlerImpl to propagate the Body for us in RoutingContext.

### Reproducer

https://github.com/DemonicTutor/vertx-434-issues
https://github.com/DemonicTutor/vertx-434-issues/blob/main/src/test/java/com/noenv/vertx434issues/UploadTest.java

### Extra

* openJdk 19


Changed files:
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/BodyHandlerImpl.java, vertx-web/src/main/java/io/vertx/ext/web/handler/impl/OAuth2AuthHandlerImpl.java

diff --git a/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/BodyHandlerImpl.java b/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/BodyHandlerImpl.java
index 0269e9cca..2e674a2ef 100644
--- a/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/BodyHandlerImpl.java
+++ b/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/BodyHandlerImpl.java
@@ -87,8 +87,11 @@ public class BodyHandlerImpl implements BodyHandler {
       // or `content-length` headers set.
       // http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
       final long parsedContentLength = parseContentLengthHeader(request);
+      // http2 never transmits a `transfer-encoding` as frames are chunks.
+      final boolean hasTransferEncoding =
+        request.version() == HttpVersion.HTTP_2 || request.headers().contains(HttpHeaders.TRANSFER_ENCODING);
 
-      if (!request.headers().contains(HttpHeaders.TRANSFER_ENCODING) && parsedContentLength == -1) {
+      if (!hasTransferEncoding && parsedContentLength == -1) {
         // there is no "body", so we can skip this handler
         context.next();
         return;
diff --git a/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/OAuth2AuthHandlerImpl.java b/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/OAuth2AuthHandlerImpl.java
index b85d3b15a..a88e50284 100644
--- a/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/OAuth2AuthHandlerImpl.java
+++ b/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/OAuth2AuthHandlerImpl.java
@@ -30,6 +30,7 @@ import io.vertx.ext.auth.VertxContextPRNG;
 import io.vertx.ext.auth.authentication.Credentials;
 import io.vertx.ext.auth.authentication.TokenCredentials;
 import io.vertx.ext.auth.oauth2.OAuth2Auth;
+import io.vertx.ext.auth.oauth2.OAuth2FlowType;
 import io.vertx.ext.auth.oauth2.Oauth2Credentials;
 import io.vertx.ext.web.Route;
 import io.vertx.ext.web.RoutingContext;
@@ -434,6 +435,7 @@ public class OAuth2AuthHandlerImpl extends HTTPAuthorizationHandler<OAuth2Auth>
       }
 
       final Oauth2Credentials credentials = new Oauth2Credentials()
+        .setFlow(OAuth2FlowType.AUTH_CODE)
         .setCode(code);
 
       // the state that was passed to the IdP server. The state can be
Repository: vert-x3/vertx-web
Issue: SSL not set for secure Request

### Questions
I'm currently encountering a strange bug. I'm not entirely sure whether its me, or whether something odd is happening in the vertx Code. 
I'm adding a secure cookie to a WebClientSession and then try to request a page from a server. 
However, the cookie is not added to the request, since the request does not set the ssl flag. 
I think I've found the problematic code in line 220 of HttpRequestImpl:
```java
      if (ssl != null && ssl != client.options.isSsl()) {
        requestOptions
          .setSsl(ssl);
      }
```
These lines will not set the ssl flag in the requestOptions if both the client.opentions.isSsl() and ssl are true. since the ssl flag on this is set to true before the line. I'm not sure, but I got the impression, that this should either be an `||` comparison, or something else is going on here. 

### Version

4.3.1, the same code worked with 4.2.7

### Context

I had a test that tried to use a new session with an existing cookie but the cookie was not loaded, since the cookie was secure, but the request claimed to not have the ssl flag set.

### Do you have a reproducer?

Somewhat:
https://github.com/tpfau/vertx_issue

By packaging the project you can see, that the Cookiestore gets a request for a non-ssl cookie, while the client options are set to be ssl. 

### Steps to reproduce

Run the Tests of the reproducer, this should show that the cookiestore gets a request for a non-ssl cookie while it should get one for an ssl cookie. 



Changed files:
vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpRequestImpl.java

diff --git a/vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpRequestImpl.java b/vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpRequestImpl.java
index 34313458b..da9290138 100644
--- a/vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpRequestImpl.java
+++ b/vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpRequestImpl.java
@@ -217,7 +217,10 @@ public class HttpRequestImpl<T> implements HttpRequest<T> {
         .setHost(host)
         .setPort(port)
         .setURI(uri);
-      if (ssl != null && ssl != client.options.isSsl()) {
+      // if the user specified SSL we always enforce it
+      // even if the client has a default, because the default
+      // may have been used previously to compute the request options
+      if (ssl != null) {
         requestOptions
           .setSsl(ssl);
       }
Repository: spring-cloud/spring-cloud-dataflow
Issue: Step Execution Count incorrect when same job is executed multiple times

When executing a batch job (with same job name) multiple times the step execution count for   for all instances are the same.  i.e. if a job has 3 steps, the step execution count for the first run will be 3.  The next time its run the step count for the current run and previous run will be 6.

Steps to reproduce.  Execute a batch job(task) and then rerun it.  Then go to the shell and execute a job execution list.

Changed files:
spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskJobService.java

diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskJobService.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskJobService.java
index 9644bd213..91c521b15 100644
--- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskJobService.java
+++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskJobService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 the original author or authors.
+ * Copyright 2016-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.batch.admin.service.JobService;
 import org.springframework.batch.core.JobExecution;
 import org.springframework.batch.core.JobInstance;
+import org.springframework.batch.core.Step;
 import org.springframework.batch.core.StepExecution;
 import org.springframework.batch.core.launch.JobExecutionNotRunningException;
 import org.springframework.batch.core.launch.NoSuchJobException;
@@ -52,6 +53,7 @@ import org.springframework.util.Assert;
  * @author Glenn Renfro.
  * @author Gunnar Hillert
  * @author Mark Fisher
+ * @author Ilayaperumal Gopinathan
  */
 public class DefaultTaskJobService implements TaskJobService {
 
@@ -91,8 +93,14 @@ public class DefaultTaskJobService implements TaskJobService {
 				jobService.listJobExecutions(pageable.getOffset(),
 				pageable.getPageSize()));
 		for (JobExecution jobExecution : jobExecutions){
-			jobExecution.addStepExecutions(
-					new ArrayList<StepExecution>(jobService.getStepExecutions(jobExecution.getId())));
+			Collection<StepExecution> stepExecutions = jobService.getStepExecutions(jobExecution.getId());
+			List<StepExecution> validStepExecutions = new ArrayList<>();
+			for (StepExecution stepExecution: stepExecutions) {
+				if (stepExecution.getId() != null) {
+					validStepExecutions.add(stepExecution);
+				}
+			}
+			jobExecution.addStepExecutions(validStepExecutions);
 		}
 
 		return getTaskJobExecutionsForList(jobExecutions);
Repository: spring-cloud/spring-cloud-dataflow
Issue: app info cmd throws exception for `app info <type:name>`

Description:
```
dataflow:>app info source:http
Command failed java.lang.IllegalArgumentException: The options [<type>:<name>] and  [--name && --type] are mutually exclusive and one of these should be specified to uniquely identify the application
```

Release versions:
Latest master, 1.7.0.RC1



Changed files:
spring-cloud-dataflow-shell-core/src/main/java/org/springframework/cloud/dataflow/shell/command/classic/ClassicAppRegistryCommands.java

diff --git a/spring-cloud-dataflow-shell-core/src/main/java/org/springframework/cloud/dataflow/shell/command/classic/ClassicAppRegistryCommands.java b/spring-cloud-dataflow-shell-core/src/main/java/org/springframework/cloud/dataflow/shell/command/classic/ClassicAppRegistryCommands.java
index 72c867037..0b3cf45be 100644
--- a/spring-cloud-dataflow-shell-core/src/main/java/org/springframework/cloud/dataflow/shell/command/classic/ClassicAppRegistryCommands.java
+++ b/spring-cloud-dataflow-shell-core/src/main/java/org/springframework/cloud/dataflow/shell/command/classic/ClassicAppRegistryCommands.java
@@ -88,8 +88,7 @@ public class ClassicAppRegistryCommands extends AbstractAppRegistryCommands impl
 	public List<Object> info(
 			@CliOption(key = { "", "id" },
 					help = "id of the application to query in the form of 'type:name'") QualifiedApplicationName application,
-			@CliOption(key = { "",
-					"name" }, help = "name of the application to query") String applicationName,
+			@CliOption(key = { "", "name" }, help = "name of the application to query") String applicationName,
 			@CliOption(key = {
 					"type" }, help = "type of the application to query") ApplicationType applicationType,
 			@CliOption(key = { "exhaustive" }, help = "return all metadata, including common Spring Boot properties",
@@ -142,7 +141,7 @@ public class ClassicAppRegistryCommands extends AbstractAppRegistryCommands impl
 
 	private boolean assertAppInfoOptions(QualifiedApplicationName application, String name, ApplicationType type) {
 		if (application != null && StringUtils.hasText(application.name) && application.type != null) {
-			return !(StringUtils.hasText(name) || (type != null));
+			return type == null;
 		}
 		else {
 			return (StringUtils.hasText(name) && type != null);
Repository: spring-cloud/spring-cloud-dataflow
Issue: RootController shows invalid value for AppInstanceController

Project: _spring-cloud-dataflow-server-core_

Billboard URL on **RootController**  `@RequestMapping("/")`:

`http://localhost:9393/`

The problematic part of it:

`{
"rel": "runtime/apps/instances",
"href": "http://localhost:9393/runtime/apps/interface%20org.springframework.web.util.UriComponents%24UriTemplateVariables/instances"
}`

According the code the **RootController** pass the **UriComponents.UriTemplateVariables.SKIP_VALUE** parameter to get the link for **AppInstanceStatusResource** class, but instead of it the `href` should be something like this:

`/runtime/apps/{appId}/instances`

This part `interface%20org.springframework.web.util.UriComponents%24UriTemplateVariables` is inserted into the placeholder for `{appId}`.

This problem appears in the following versions:
Local Dataflow Server: 1.2.3
Newer implementations and milestones: 1.3.0 M3
I did not try with older versions.

Changed files:
spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/RootController.java

diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/RootController.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/RootController.java
index 5a7276f9f..c2ea71531 100644
--- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/RootController.java
+++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/RootController.java
@@ -105,7 +105,7 @@ public class RootController {
 			root.add(unescapeTemplateVariables(
 					entityLinks.linkForSingleResource(AppStatusResource.class, "{appId}").withRel("runtime/apps/app")));
 			root.add(unescapeTemplateVariables(
-					entityLinks.linkFor(AppInstanceStatusResource.class, UriComponents.UriTemplateVariables.SKIP_VALUE)
+					entityLinks.linkFor(AppInstanceStatusResource.class, "{appId}")
 							.withRel("runtime/apps/instances")));
 			root.add(linkTo(MetricsController.class).withRel("metrics/streams"));
 		}
Repository: spring-cloud/spring-cloud-dataflow
Issue: Don't query for latest task executions when no task definitions are present

Depended on by https://github.com/spring-cloud/spring-cloud-dataflow-ui/issues/833

Changed files:
spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskDefinitionController.java

diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskDefinitionController.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskDefinitionController.java
index 96c130bd5..705aa3a23 100644
--- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskDefinitionController.java
+++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskDefinitionController.java
@@ -142,9 +142,18 @@ public class TaskDefinitionController {
 		for (TaskDefinition taskDefinition : taskDefinitions) {
 			taskDefinitionMap.put(taskDefinition.getName(), taskDefinition);
 		}
-		List<TaskExecution> taskExecutions = explorer.getLatestTaskExecutionsByTaskNames(taskDefinitionMap.keySet().toArray(new String[taskDefinitionMap.size()]));
 
-		Page<TaskExecutionAwareTaskDefinition> taskExecutionAwareTaskDefinitions = taskDefinitions.map(new TaskDefinitionConverter(taskExecutions));
+		final List<TaskExecution> taskExecutions;
+
+		if (!taskDefinitionMap.isEmpty()) {
+			taskExecutions =
+					explorer.getLatestTaskExecutionsByTaskNames(taskDefinitionMap.keySet().toArray(new String[taskDefinitionMap.size()]));
+		}
+		else {
+			taskExecutions = null;
+		}
+
+		final Page<TaskExecutionAwareTaskDefinition> taskExecutionAwareTaskDefinitions = taskDefinitions.map(new TaskDefinitionConverter(taskExecutions));
 
 		return assembler.toResource(taskExecutionAwareTaskDefinitions, taskAssembler);
 	}
Repository: spring-cloud/spring-cloud-dataflow
Issue: Review Task's handling of quotes in launch arguments

Currently Task's launch controller forcefully removes all quotes inside the input arguments. This could break some RegeEx or other task functionality.

Changed files:
spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/TaskControllerTests.java
spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionController.java

diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionController.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionController.java
index 6b60ff567..a2e362823 100644
--- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionController.java
+++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionController.java
@@ -145,8 +145,7 @@ public class TaskExecutionController {
 		Map<String, String> propertiesToUse = DeploymentPropertiesUtils.parse(properties);
 		DeploymentPropertiesUtils.validateDeploymentProperties(propertiesToUse);
 		List<String> argumentsToUse = DeploymentPropertiesUtils.parseParamList(arguments, " ");
-		return this.taskService.executeTask(taskName, propertiesToUse,
-				DeploymentPropertiesUtils.removeQuoting(argumentsToUse));
+		return this.taskService.executeTask(taskName, propertiesToUse, argumentsToUse);
 	}
 
 	/**
diff --git a/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/TaskControllerTests.java b/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/TaskControllerTests.java
index 0c6b472dd..1aca8bb6b 100644
--- a/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/TaskControllerTests.java
+++ b/spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/TaskControllerTests.java
@@ -294,7 +294,7 @@ public class TaskControllerTests {
 		assertThat(request.getCommandlineArguments().size(), is(3 + 1)); // +1 for spring.cloud.task.executionid
 		assertThat(request.getCommandlineArguments().get(0), is("--foobar=jee"));
 		assertThat(request.getCommandlineArguments().get(1), is("--foobar2=jee2,foo=bar"));
-		assertThat(request.getCommandlineArguments().get(2), is("--foobar3=jee3 jee3"));
+		assertThat(request.getCommandlineArguments().get(2), is("--foobar3='jee3 jee3'"));
 		assertEquals("myTask3", request.getDefinition().getProperties().get("spring.cloud.task.name"));
 	}
Repository: spring-cloud/spring-cloud-stream
Issue: Allow for binders without embedded headers to process 'originalContentType'

As part of the changes that led to support for native serialization/deserialization we've made the assumption that any payload that is not a `byte[]` is already fully processed and so will skip `deserializePayloadIfNecessary`. However, if the binder is based on endpoints that do their own deserialization and populate headers (as for example RabbitMQ and the upcoming JMS), the current changes skip the part where `originalContentType` is processed. We should be more lenient and allow `deserializePayloadIfNecessary` to execute if we have an `originalContentType` header.

Changed files:
spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/AbstractMessageChannelBinder.java

diff --git a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/AbstractMessageChannelBinder.java b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/AbstractMessageChannelBinder.java
index 3aac7c84d..db24919d0 100644
--- a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/AbstractMessageChannelBinder.java
+++ b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/AbstractMessageChannelBinder.java
@@ -278,7 +278,8 @@ public abstract class AbstractMessageChannelBinder<C extends ConsumerProperties,
 		@Override
 		@SuppressWarnings("unchecked")
 		protected Object handleRequestMessage(Message<?> requestMessage) {
-			if (!(requestMessage.getPayload() instanceof byte[])) {
+			if (!(requestMessage.getPayload() instanceof byte[])
+					&& !requestMessage.getHeaders().containsKey(BinderHeaders.BINDER_ORIGINAL_CONTENT_TYPE)) {
 				return requestMessage;
 			}
 			MessageValues messageValues;
Repository: spring-cloud/spring-cloud-stream
Issue: Compilation issue on reactor 3.0.4 upgrade

master has this compilation issue:

```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project spring-cloud-stream-reactive: Compilation failure
[ERROR] /home/travis/build/spring-cloud/spring-cloud-stream/spring-cloud-stream-reactive/src/main/java/org/springframework/cloud/stream/reactive/ObservableToMessageChannelResultAdapter.java:[50,66] method from in class reactor.core.publisher.Flux<T> cannot be applied to given types;
[ERROR] required: org.reactivestreams.Publisher<? extends T>
[ERROR] found: org.reactivestreams.Publisher<capture#1 of ?>
[ERROR] reason: cannot infer type-variable(s) T,T
[ERROR] (argument mismatch; org.reactivestreams.Publisher<capture#2 of ?> cannot be converted to org.reactivestreams.Publisher<? extends capture#2 of ?>)
[ERROR] -> [Help 1]
[ERROR] 
```

Changed files:
spring-cloud-stream-reactive/src/main/java/org/springframework/cloud/stream/reactive/ObservableToMessageChannelResultAdapter.java

diff --git a/spring-cloud-stream-reactive/src/main/java/org/springframework/cloud/stream/reactive/ObservableToMessageChannelResultAdapter.java b/spring-cloud-stream-reactive/src/main/java/org/springframework/cloud/stream/reactive/ObservableToMessageChannelResultAdapter.java
index 42c459a06..1157bb71d 100644
--- a/spring-cloud-stream-reactive/src/main/java/org/springframework/cloud/stream/reactive/ObservableToMessageChannelResultAdapter.java
+++ b/spring-cloud-stream-reactive/src/main/java/org/springframework/cloud/stream/reactive/ObservableToMessageChannelResultAdapter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 the original author or authors.
+ * Copyright 2016-2017 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
 
 package org.springframework.cloud.stream.reactive;
 
+import org.reactivestreams.Publisher;
 import reactor.core.publisher.Flux;
 import rx.Observable;
 import rx.RxReactiveStreams;
@@ -27,6 +28,7 @@ import org.springframework.util.Assert;
 /**
  * A {@link StreamListenerResultAdapter} from an {@link Observable}
  * return type to a bound {@link MessageChannel}.
+ *
  * @author Marius Bogoevici
  */
 public class ObservableToMessageChannelResultAdapter
@@ -47,7 +49,7 @@ public class ObservableToMessageChannelResultAdapter
 	}
 
 	public void adapt(Observable<?> streamListenerResult, MessageChannel bindingTarget) {
-		this.fluxToMessageChannelResultAdapter.adapt(Flux.from(RxReactiveStreams.toPublisher(streamListenerResult)),
-				bindingTarget);
+		Publisher<?> adaptedPublisher = RxReactiveStreams.toPublisher(streamListenerResult);
+		this.fluxToMessageChannelResultAdapter.adapt(Flux.from(adaptedPublisher), bindingTarget);
 	}
 }