Skip to content

DeployMojo fix ssh deploy#466

Merged
jbonofre merged 1 commit into
apache:masterfrom
reenigneEsrever92:mojo-deploy-fix
Mar 26, 2018
Merged

DeployMojo fix ssh deploy#466
jbonofre merged 1 commit into
apache:masterfrom
reenigneEsrever92:mojo-deploy-fix

Conversation

@reenigneEsrever92
Copy link
Copy Markdown

issue: 5642

@jbonofre jbonofre self-requested a review February 23, 2018 15:43
Copy link
Copy Markdown
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify ?

}

final ClientChannel channel = session.createChannel("exec", print.toString().concat(NEW_LINE));
final ClientChannel channel = session.createChannel("exec", writer.toString().concat(NEW_LINE));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using the writer whereas we have the printwriter ?

            StringWriter writer = new StringWriter();
            PrintWriter print = new PrintWriter(writer, true);

Copy link
Copy Markdown
Author

@reenigneEsrever92 reenigneEsrever92 Feb 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PrintWriter doesn't override the toString method. So whenever deploying it would actually try to execute as it says in the ticket: KARAF-5642

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok got it. So the consequence is a invalid string. Thx.

@jbonofre jbonofre merged commit 7b5d9a1 into apache:master Mar 26, 2018
gnodet pushed a commit to gnodet/karaf that referenced this pull request Mar 7, 2022
[ENTESB-16480] We need SMX version of the activation API...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants