You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/12/11 12:39:59 UTC

(camel) branch main updated: Fixed NPE

This is an automated email from the ASF dual-hosted git repository.

davsclaus 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 9cc62845ea7 Fixed NPE
9cc62845ea7 is described below

commit 9cc62845ea738c04609542a6a86f7e98db664443
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Dec 11 13:39:47 2023 +0100

    Fixed NPE
---
 .../java/org/apache/camel/tooling/maven/DefaultRepositoryResolver.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/DefaultRepositoryResolver.java b/tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/DefaultRepositoryResolver.java
index 7661f6d3958..9a4521de6ca 100644
--- a/tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/DefaultRepositoryResolver.java
+++ b/tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/DefaultRepositoryResolver.java
@@ -28,6 +28,9 @@ public class DefaultRepositoryResolver extends ServiceSupport implements Reposit
 
     @Override
     public String resolveRepository(String idOrUrl) {
+        if (idOrUrl == null || idOrUrl.isBlank()) {
+            return null;
+        }
         String answer = idOrUrl;
         if (repos != null) {
             answer = repos.getProperty(idOrUrl, idOrUrl);