You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Aurélien Pupier (Jira)" <ji...@apache.org> on 2020/10/01 13:41:00 UTC
[jira] [Commented] (CAMEL-15610) NPE in
CamelXmlTreeParserHelper.parseCamelRouteTree(CamelXmlTreeParserHelper.java:47)
when routes are empty
[ https://issues.apache.org/jira/browse/CAMEL-15610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17205522#comment-17205522 ]
Aurélien Pupier commented on CAMEL-15610:
-----------------------------------------
looking to provide a PR
> NPE in CamelXmlTreeParserHelper.parseCamelRouteTree(CamelXmlTreeParserHelper.java:47) when routes are empty
> -----------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-15610
> URL: https://issues.apache.org/jira/browse/CAMEL-15610
> Project: Camel
> Issue Type: Bug
> Components: tooling
> Affects Versions: 3.5.0
> Reporter: Aurélien Pupier
> Priority: Major
>
> {noformat}
> java.lang.NullPointerException
> at org.apache.camel.parser.helper.CamelXmlTreeParserHelper.parseCamelRouteTree(CamelXmlTreeParserHelper.java:47)
> at org.apache.camel.parser.XmlRouteParser.parseXmlRouteTree(XmlRouteParser.java:99)
> at com.github.cameltooling.lsp.internal.documentsymbol.DocumentSymbolXMLProcessor.getSymbolInformations(DocumentSymbolXMLProcessor.java:56)
> {noformat}
> minimal test to reproduce:
> {noformat}
> @Test
> void minimalTestShowingNPE() throws IOException {
> String textTotest =
> "<camelContext id=\"camel\" xmlns=\"http://camel.apache.org/schema/spring\">\r\n" +
> "\r\n" +
> " <route id=\"a route\">\r\n" +
> " </route>\r\n" +
> "\r\n"
> + "</camelContext>\n";
> File camelFile = File.createTempFile("camelFile", ".xml");
> Files.write(textTotest.getBytes(), camelFile);
> XmlRouteParser.parseXmlRouteTree(new ByteArrayInputStream(textTotest.getBytes()), "", camelFile.getAbsolutePath());
> }
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)