This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
commit d00a097201e4d9410afb67aef6e916a2b4201715 Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Tue May 5 17:23:58 2020 +0200 chore: avoid overriding default methods --- .../src/main/java/org/apache/camel/k/Runtime.java | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/camel-k-runtime-core/src/main/java/org/apache/camel/k/Runtime.java b/camel-k-runtime-core/src/main/java/org/apache/camel/k/Runtime.java index cac8eef..f07c400 100644 --- a/camel-k-runtime-core/src/main/java/org/apache/camel/k/Runtime.java +++ b/camel-k-runtime-core/src/main/java/org/apache/camel/k/Runtime.java @@ -140,16 +140,7 @@ public interface Runtime extends HasCamelContext { * @return the runtime */ static Runtime on(CamelContext camelContext) { - return new Runtime() { - @Override - public void setPropertiesLocations(Collection<String> locations) { - } - - @Override - public CamelContext getCamelContext() { - return camelContext; - } - }; + return () -> camelContext; } /** @@ -159,15 +150,6 @@ public interface Runtime extends HasCamelContext { * @return the runtime */ static Runtime on(HasCamelContext provider) { - return new Runtime() { - @Override - public void setPropertiesLocations(Collection<String> locations) { - } - - @Override - public CamelContext getCamelContext() { - return provider.getCamelContext(); - } - }; + return () -> provider.getCamelContext(); } }