You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:46:32 UTC
[29/50] brooklyn-library git commit: NginxController;
fixes a bug with key copying and null vs isEmpty
NginxController; fixes a bug with key copying and null vs isEmpty
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/44556c4f
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/44556c4f
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/44556c4f
Branch: refs/heads/0.4.0
Commit: 44556c4fd84c5d6aaa91890d5d892f9ab8d81925
Parents: 3192fb8
Author: Peter Veentjer <pe...@cloudsoft.com>
Authored: Tue Oct 9 11:50:05 2012 +0300
Committer: Peter Veentjer <pe...@cloudsoft.com>
Committed: Tue Oct 9 11:50:05 2012 +0300
----------------------------------------------------------------------
.../main/java/brooklyn/entity/proxy/nginx/NginxController.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/44556c4f/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxController.groovy
----------------------------------------------------------------------
diff --git a/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxController.groovy b/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxController.groovy
index 884ff15..dc230df 100644
--- a/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxController.groovy
+++ b/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxController.groovy
@@ -176,14 +176,14 @@ public class NginxController extends AbstractController {
NginxSshDriver driver = (NginxSshDriver) getDriver();
if (!Strings.isEmpty(ssl.certificateSourceUrl)) {
- String certificateDestination = ssl.certificateDestination == null ? driver.getRunDir() + "/conf/" + id + ".crt" : ssl.certificateDestination;
+ String certificateDestination = Strings.isEmpty(ssl.certificateDestination) ? driver.getRunDir() + "/conf/" + id + ".crt" : ssl.certificateDestination;
driver.machine.copyTo(permissions: "0400",
new ResourceUtils(this).getResourceFromUrl(ssl.certificateSourceUrl),
certificateDestination);
}
if (!Strings.isEmpty(ssl.keySourceUrl)) {
- String keyDestination = ssl.keyDestination == null ? driver.getRunDir() + "/conf/" + id + ".key" : ssl.keyDestination;
+ String keyDestination = Strings.isEmpty(ssl.keyDestination) ? driver.getRunDir() + "/conf/" + id + ".key" : ssl.keyDestination;
driver.machine.copyTo(permissions: "0400",
new ResourceUtils(this).getResourceFromUrl(ssl.keySourceUrl),
keyDestination);