Mercurial > hg > openjdk > jigsaw > jdk
changeset 7237:c534937f6e94
8011234: Performance regression with ftp protocol when uploading in image mode
Reviewed-by: chegar
author | alanb |
---|---|
date | Wed, 03 Apr 2013 13:15:39 +0100 |
parents | b4f68aca1000 |
children | eb8f7bc6f964 |
files | src/share/classes/sun/net/ftp/impl/FtpClient.java |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/net/ftp/impl/FtpClient.java Tue Apr 02 16:26:54 2013 -0700 +++ b/src/share/classes/sun/net/ftp/impl/FtpClient.java Wed Apr 03 13:15:39 2013 +0100 @@ -1299,16 +1299,16 @@ * <code>null</code> if the command was unsuccessful. * @throws IOException if an error occured during the transmission. */ - public OutputStream putFileStream(String name, boolean unique) throws sun.net.ftp.FtpProtocolException, IOException { + public OutputStream putFileStream(String name, boolean unique) + throws sun.net.ftp.FtpProtocolException, IOException + { String cmd = unique ? "STOU " : "STOR "; Socket s = openDataConnection(cmd + name); if (s == null) { return null; } - if (type == TransferType.BINARY) { - return s.getOutputStream(); - } - return new sun.net.TelnetOutputStream(s.getOutputStream(), false); + boolean bm = (type == TransferType.BINARY); + return new sun.net.TelnetOutputStream(s.getOutputStream(), bm); } /**