Skip to content

Commit

Permalink
fix compilation errors in camel-master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
zbendhiba committed Apr 8, 2021
1 parent 3b630b2 commit 6f45524
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
import org.apache.camel.impl.engine.DefaultUnitOfWorkFactory;
import org.apache.camel.impl.engine.DefaultUriFactoryResolver;
import org.apache.camel.impl.engine.DefaultValidatorRegistry;
import org.apache.camel.impl.engine.EndpointKey;
import org.apache.camel.impl.engine.PrototypeExchangeFactory;
import org.apache.camel.impl.engine.PrototypeProcessorExchangeFactory;
import org.apache.camel.impl.engine.RouteService;
import org.apache.camel.impl.engine.TransformerKey;
import org.apache.camel.impl.engine.ValidatorKey;
Expand Down Expand Up @@ -139,6 +139,7 @@
import org.apache.camel.spi.NodeIdFactory;
import org.apache.camel.spi.PackageScanClassResolver;
import org.apache.camel.spi.PackageScanResourceResolver;
import org.apache.camel.spi.ProcessorExchangeFactory;
import org.apache.camel.spi.ProcessorFactory;
import org.apache.camel.spi.PropertiesComponent;
import org.apache.camel.spi.ReactiveExecutor;
Expand All @@ -163,6 +164,7 @@
import org.apache.camel.spi.XMLRoutesDefinitionLoader;
import org.apache.camel.support.CamelContextHelper;
import org.apache.camel.support.DefaultUuidGenerator;
import org.apache.camel.support.NormalizedUri;
import org.apache.camel.support.ResolverHelper;
import org.apache.camel.util.IOHelper;
import org.apache.camel.util.ObjectHelper;
Expand Down Expand Up @@ -474,7 +476,7 @@ protected RestRegistryFactory createRestRegistryFactory() {
}

@Override
protected EndpointRegistry<EndpointKey> createEndpointRegistry(Map<EndpointKey, Endpoint> endpoints) {
protected EndpointRegistry<NormalizedUri> createEndpointRegistry(Map<NormalizedUri, Endpoint> endpoints) {
return new DefaultEndpointRegistry(this, endpoints);
}

Expand Down Expand Up @@ -687,6 +689,17 @@ protected ExchangeFactoryManager createExchangeFactoryManager() {
return new DefaultExchangeFactoryManager();
}

@Override
protected ProcessorExchangeFactory createProcessorExchangeFactory() {
Optional<ProcessorExchangeFactory> result = ResolverHelper.resolveService(
getCamelContextReference(),
getBootstrapFactoryFinder(),
ProcessorExchangeFactory.FACTORY,
ProcessorExchangeFactory.class);

return result.orElseGet(PrototypeProcessorExchangeFactory::new);
}

@Override
public List<RouteDefinition> getRouteDefinitions() {
return model.getRouteDefinitions();
Expand Down
12 changes: 12 additions & 0 deletions extensions-jvm/kotlin-dsl/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-kotlin-dsl</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-script-util</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-scripting-jvm</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-scripting-jvm-host</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
4 changes: 4 additions & 0 deletions extensions/jsonpath/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-jsonpath</artifactId>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package org.apache.camel.quarkus.component.json.path.it;

import java.util.Arrays;
import java.util.List;

import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
Expand All @@ -26,7 +25,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertIterableEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

@QuarkusTest
class JsonPathTransformTest {
Expand All @@ -45,11 +44,11 @@ public void setup() {

@Test
public void getAllCarColorsShouldSucceed() {
List<String> colors = RestAssured.given() //
String colors = RestAssured.given() //
.contentType(ContentType.JSON).body(carsRequest).get("/jsonpath/getAllCarColors").then().statusCode(200)
.extract().body().jsonPath().getList(".", String.class);
.extract().body().asString();

assertIterableEquals(Arrays.asList("red", "green"), colors);
assertEquals("[red, green]", colors);
}

}
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<jersey-sun.version>1.19.4</jersey-sun.version><!-- Spark -->
<jetty.version>${jetty9-version}</jetty.version>
<jnr-ffi.version>2.1.2</jnr-ffi.version><!-- Mess in web3j transitive deps -->
<json-smart.version>2.4.2</json-smart.version>
<kafka.version>2.5.0</kafka.version>
<kudu.version>${kudu-version}</kudu.version><!-- keep in sync with Camel -->
<kotlin.version>1.4.31</kotlin.version><!-- keep in sync with Quarkus -->
Expand Down
20 changes: 20 additions & 0 deletions poms/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5958,6 +5958,21 @@
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-script-util</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-scripting-jvm</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-scripting-jvm-host</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jruby.jcodings</groupId>
<artifactId>jcodings</artifactId>
Expand Down Expand Up @@ -6064,6 +6079,11 @@
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${json-smart.version}</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
Expand Down

0 comments on commit 6f45524

Please sign in to comment.