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

astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 6e83c1e  fix(controller): panic on nil application properties
6e83c1e is described below

commit 6e83c1e6af87ce6b71cd8afc9af5fbb87a58b2ce
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Fri Jul 23 12:06:09 2021 +0200

    fix(controller): panic on nil application properties
---
 pkg/controller/kameletbinding/error_handler.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pkg/controller/kameletbinding/error_handler.go 
b/pkg/controller/kameletbinding/error_handler.go
index 4f71156..57aa06b 100644
--- a/pkg/controller/kameletbinding/error_handler.go
+++ b/pkg/controller/kameletbinding/error_handler.go
@@ -100,6 +100,10 @@ func setErrorHandlerConfiguration(errorHandlerBinding 
*bindings.Binding, errorHa
        if err != nil {
                return err
        }
+       // initialize map if not yet initialized
+       if errorHandlerBinding.ApplicationProperties == nil {
+               errorHandlerBinding.ApplicationProperties = 
make(map[string]string)
+       }
        for key, value := range properties {
                errorHandlerBinding.ApplicationProperties[key] = 
fmt.Sprintf("%v", value)
        }

Reply via email to