You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org> on 2015/04/02 16:12:53 UTC

[jira] [Commented] (JCLOUDS-876) loginPassword / loginPrivateKey not initialized by RunScriptOptions

    [ https://issues.apache.org/jira/browse/JCLOUDS-876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14392743#comment-14392743 ] 

Francesco Chicchiriccò commented on JCLOUDS-876:
------------------------------------------------

The change described above is basically

{code}
diff --git a/compute/src/main/java/org/jclouds/compute/options/RunScriptOptions.java b/compute/src/main/java/org/jclouds/compute/options/RunScriptOptions.java
index 2e072b9..6247b06 100644
--- a/compute/src/main/java/org/jclouds/compute/options/RunScriptOptions.java
+++ b/compute/src/main/java/org/jclouds/compute/options/RunScriptOptions.java
@@ -166,8 +166,8 @@ public class RunScriptOptions {
 
    protected String loginUser;
    protected Boolean authenticateSudo;
-   protected Optional<String> loginPassword;
-   protected Optional<String> loginPrivateKey;
+   protected Optional<String> loginPassword = Optional.absent();
+   protected Optional<String> loginPrivateKey = Optional.absent();
 
    public RunScriptOptions overrideLoginCredentials(LoginCredentials overridingCredentials) {
       checkNotNull(overridingCredentials, "overridingCredentials");
{code}

and is causing several test failures in {{TemplateOptionsTest}} (which can be easily fixed) and {{StubComputeServiceIntegrationTest}} (which are instead hard to understand, at least for me).

> loginPassword / loginPrivateKey not initialized by RunScriptOptions
> -------------------------------------------------------------------
>
>                 Key: JCLOUDS-876
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-876
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute
>    Affects Versions: 2.0.0
>            Reporter: Francesco Chicchiriccò
>             Fix For: 2.0.0
>
>
> During review of [this pull request|https://github.com/jclouds/jclouds-labs/pull/156#discussion_r27519191] it was suggested by [~nacx] to provide a fix to the parent class, e.g. {{RunScriptOptions}}: the fix consists in initializing {{loginPassword}} / {{loginPrivateKey}} as {{Optional.absent()}} instead of {{null}}, in order to make the {{copyTo()}} method work properly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)