camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [6/6] camel git commit: CAMEL-10556: camel-websocket to load static resources from osgi. Fixed example also.
Date Sun, 04 Dec 2016 13:36:00 GMT
CAMEL-10556: camel-websocket to load static resources from osgi. Fixed example also.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b79471c7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b79471c7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b79471c7

Branch: refs/heads/master
Commit: b79471c7debb647ac97f538a1339b8ebb4eaf5a7
Parents: 1b012c5
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Dec 4 14:32:45 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Dec 4 14:32:45 2016 +0100

----------------------------------------------------------------------
 .../apache/camel/component/websocket/WebsocketComponent.java    | 5 +----
 .../src/main/resources/webapp/index.html                        | 4 ----
 2 files changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b79471c7/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
index 54ff62b..ab0a0f0 100644
--- a/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
+++ b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
@@ -393,10 +393,7 @@ public class WebsocketComponent extends UriEndpointComponent {
             }
 
             if (resources[0].equals("classpath")) {
-                // Does not work when deployed as a bundle
-                // context.setBaseResource(new JettyClassPathResource(getCamelContext().getClassResolver(),
resources[1]));
-                URL url = this.getCamelContext().getClassResolver().loadResourceAsURL(resources[1]);
-                context.setBaseResource(Resource.newResource(url));
+                context.setBaseResource(new JettyClassPathResource(getCamelContext().getClassResolver(),
resources[1]));
             } else if (resources[0].equals("file")) {
                 context.setBaseResource(Resource.newResource(resources[1]));
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/b79471c7/examples/camel-example-twitter-websocket-blueprint/src/main/resources/webapp/index.html
----------------------------------------------------------------------
diff --git a/examples/camel-example-twitter-websocket-blueprint/src/main/resources/webapp/index.html
b/examples/camel-example-twitter-websocket-blueprint/src/main/resources/webapp/index.html
index 48b0176..10a0006 100644
--- a/examples/camel-example-twitter-websocket-blueprint/src/main/resources/webapp/index.html
+++ b/examples/camel-example-twitter-websocket-blueprint/src/main/resources/webapp/index.html
@@ -1,7 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
-
     Licensed to the Apache Software Foundation (ASF) under one or more
     contributor license agreements.  See the NOTICE file distributed with
     this work for additional information regarding copyright ownership.
@@ -18,7 +15,6 @@
     limitations under the License.
 
 -->
-
 <html>
 
 <head>


Mime
View raw message