Skip to content

Commit

Permalink
Fix apache#365: change sinkbinding to be a customizer unrelated to th…
Browse files Browse the repository at this point in the history
…e knative-source loader
  • Loading branch information
nicolaferraro committed Jul 24, 2020
1 parent 713bb35 commit a4684c9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
*/
package org.apache.camel.k.knative.customizer;

import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.HashMap;
import java.util.Optional;

import com.fasterxml.jackson.core.type.TypeReference;
import org.apache.camel.CamelContext;
import org.apache.camel.component.knative.spi.Knative;
Expand All @@ -24,12 +30,6 @@
import org.apache.camel.k.annotation.Customizer;
import org.apache.camel.util.ObjectHelper;

import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.HashMap;
import java.util.Optional;

@Customizer("sinkbinding")
public class KnativeSinkBindingContextCustomizer implements ContextCustomizer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/
package org.apache.camel.k.loader.knative;

import java.util.List;
import java.util.Optional;

import org.apache.camel.CamelContext;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.k.Source;
Expand All @@ -27,9 +30,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.Optional;

@LoaderInterceptor("knative-source")
public class KnativeSourceLoaderInterceptor implements SourceLoader.Interceptor {
private static final Logger LOGGER = LoggerFactory.getLogger(KnativeSourceLoaderInterceptor.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
*/
package org.apache.camel.k.knative.customizer;

import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;

import org.apache.camel.CamelContext;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.builder.RouteBuilder;
Expand All @@ -37,9 +46,6 @@
import org.apache.camel.k.test.AvailablePortFinder;
import org.junit.jupiter.api.Test;

import java.nio.charset.StandardCharsets;
import java.util.*;

import static org.assertj.core.api.Assertions.assertThat;

public class KnativeSinkBindingCustomizerTest {
Expand Down

0 comments on commit a4684c9

Please sign in to comment.