This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new cf0ffb8d2bdb Avoid NPE on main branch when listing versions with Camel
version
cf0ffb8d2bdb is described below
commit cf0ffb8d2bdbcbf2fb0a9ef551cc1c0e2bdd4eb4
Author: Aurélien Pupier <[email protected]>
AuthorDate: Thu Oct 9 09:48:17 2025 +0200
Avoid NPE on main branch when listing versions with Camel version
the place the spring-boot-version is declared has been modified.
https://github.com/apache/camel-spring-boot/commit/71d09c68912f21c301519bbf0cfb9a325163ec10
This PR avoids the NPE when listing all versions (to get back to same
level of functionality for previous versions) but is not retrieving the
version for 4.15, to be handled in another Pull Request
Signed-off-by: Aurélien Pupier <[email protected]>
---
.../org/apache/camel/main/download/MavenDependencyDownloader.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
index 190b1f509136..e64c6ae07dc3 100644
---
a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
+++
b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
@@ -648,7 +648,10 @@ public class MavenDependencyDownloader extends
ServiceSupport implements Depende
NodeList nl = dom.getElementsByTagName("properties");
if (nl.getLength() > 0) {
Element node = (Element) nl.item(0);
- return
node.getElementsByTagName("spring-boot-version").item(0).getTextContent();
+ NodeList springBootVersionNodeList =
node.getElementsByTagName("spring-boot-version");
+ if (springBootVersionNodeList.getLength() > 0) {
+ return
springBootVersionNodeList.item(0).getTextContent();
+ }
}
}
}