You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/01/21 22:16:58 UTC

[camel-k] branch master updated: fix npe on rest trait

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 35d0369  fix npe on rest trait
35d0369 is described below

commit 35d0369c068f3f4d4f15180f178d4d025204ce64
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Mon Jan 21 23:16:48 2019 +0100

    fix npe on rest trait
---
 pkg/trait/rest.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pkg/trait/rest.go b/pkg/trait/rest.go
index b5bbdcd..8001373 100644
--- a/pkg/trait/rest.go
+++ b/pkg/trait/rest.go
@@ -53,6 +53,10 @@ func (t *restTrait) Configure(e *Environment) (bool, error) {
 		return false, nil
 	}
 
+	if e.Integration == nil {
+		return false, nil
+	}
+
 	for _, resource := range e.Integration.Spec.Resources {
 		if resource.Type == v1alpha1.ResourceTypeOpenAPI {
 			return e.IntegrationInPhase(""), nil