|
39 | 39 | import org.apache.camel.main.MainListener; |
40 | 40 | import org.apache.camel.main.RoutesCollector; |
41 | 41 | import org.apache.camel.model.Model; |
42 | | -import org.apache.camel.spi.BacklogDebugger; |
43 | 42 | import org.apache.camel.spi.BeanRepository; |
44 | 43 | import org.apache.camel.spi.CliConnector; |
45 | 44 | import org.apache.camel.spi.CliConnectorFactory; |
|
53 | 52 | import org.apache.camel.spring.spi.ApplicationContextBeanRepository; |
54 | 53 | import org.apache.camel.spring.spi.CamelBeanPostProcessor; |
55 | 54 | import org.apache.camel.support.DefaultRegistry; |
56 | | -import org.apache.camel.support.LanguageSupport; |
57 | 55 | import org.apache.camel.support.ResetableClock; |
58 | 56 | import org.apache.camel.support.ResourceHelper; |
59 | 57 | import org.apache.camel.support.service.ServiceHelper; |
@@ -191,13 +189,10 @@ public static CamelContext doConfigureCamelContext(ApplicationContext applicatio |
191 | 189 | VariableRepository repo = camelContext.getCamelContextExtension() |
192 | 190 | .getContextPlugin(VariableRepositoryFactory.class).getVariableRepository(id); |
193 | 191 | // it may be a resource to load from disk then |
194 | | - if (value.startsWith(LanguageSupport.RESOURCE)) { |
195 | | - value = value.substring(9); |
196 | | - if (ResourceHelper.hasScheme(value)) { |
197 | | - InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext, value); |
198 | | - value = IOHelper.loadText(is); |
199 | | - IOHelper.close(is); |
200 | | - } |
| 192 | + if (ResourceHelper.hasScheme(value)) { |
| 193 | + InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext, value); |
| 194 | + value = IOHelper.loadText(is); |
| 195 | + IOHelper.close(is); |
201 | 196 | } |
202 | 197 | repo.setVariable(key, value); |
203 | 198 | } |
|
0 commit comments