Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public String getUpdatedPassword(ClientSession session, String prompt, String la
print.println("bundle:install -s " + location);
}

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.

channel.setIn(new ByteArrayInputStream(new byte[0]));
final ByteArrayOutputStream sout = new ByteArrayOutputStream();
final ByteArrayOutputStream serr = new ByteArrayOutputStream();
Expand Down