Author: sebb
Date: Fri Mar 18 20:53:29 2011
New Revision: 1083063
URL: http://svn.apache.org/viewvc?rev=1083063&view=rev
Log:
Trailing spaces
Modified:
commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java
commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java
commons/proper/net/trunk/src/main/java/org/apache/commons/net/PrintCommandListener.java
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPCommand.java
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java
commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLContextUtils.java
commons/proper/net/trunk/src/test/java/org/apache/commons/net/io/DotTerminatedMessageReaderTest.java
Modified:
commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java?rev=1083063&r1=1083062&r2=1083063&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java
(original)
+++ commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java
Fri Mar 18 20:53:29 2011
@@ -163,7 +163,7 @@ public final class FTPClientExample
final FTPClient ftp;
if (protocol == null ) {
- ftp = new FTPClient();
+ ftp = new FTPClient();
} else {
ftp = new FTPSClient(protocol);
}
@@ -186,7 +186,7 @@ public final class FTPClientExample
{
int reply;
if (port > 0) {
- ftp.connect(server, port);
+ ftp.connect(server, port);
} else {
ftp.connect(server);
}
@@ -293,9 +293,9 @@ __main:
System.out.println("FEAT "+remote+" was not
detected");
} else {
System.out.println("Command failed:
"+ftp.getReplyString());
- }
+ }
}
-
+
// Strings feature check
String []features = ftp.featureValues(remote);
if (features != null) {
@@ -314,7 +314,7 @@ __main:
// Command listener has already printed the output
} else {
System.out.println("Failed: "+ftp.getReplyString());
- }
+ }
}
}
else if (doCommand != null)
Modified: commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java?rev=1083063&r1=1083062&r2=1083063&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java
(original)
+++ commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java Fri Mar
18 20:53:29 2011
@@ -64,15 +64,15 @@ public final class POP3Mail
"Usage: POP3Mail <pop3 server hostname> <username> <password>
[TLS]");
System.exit(1);
}
-
+
String server = args[0];
String username = args[1];
String password = args[2];
String proto = args.length > 3 ? args[3] : null;
-
+
POP3Client pop3;
-
+
if (proto != null) {
System.out.println("Using secure protocol: "+proto);
pop3 = new POP3SClient(proto);
@@ -80,7 +80,7 @@ public final class POP3Mail
pop3 = new POP3Client();
}
System.out.println("Connecting to server "+server+" on
"+pop3.getDefaultPort());
-
+
// We want to timeout if a response takes longer than 60 seconds
pop3.setDefaultTimeout(60000);
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/PrintCommandListener.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/PrintCommandListener.java?rev=1083063&r1=1083062&r2=1083063&view=diff
==============================================================================
---
commons/proper/net/trunk/src/main/java/org/apache/commons/net/PrintCommandListener.java
(original)
+++
commons/proper/net/trunk/src/main/java/org/apache/commons/net/PrintCommandListener.java
Fri Mar 18 20:53:29 2011
@@ -38,7 +38,7 @@ public class PrintCommandListener implem
/**
* Create the default instance which prints everything.
- *
+ *
* @param writer where to write the commands and responses
*/
public PrintCommandListener(PrintWriter writer)
@@ -48,10 +48,10 @@ public class PrintCommandListener implem
/**
* Create an instance which optionally suppresses login command text.
- *
+ *
* @param writer where to write the commands and responses
* @param suppressLogin if {@code true}, only print command name for login
- *
+ *
* @since 3.0
*/
public PrintCommandListener(PrintWriter writer, boolean suppressLogin)
@@ -62,11 +62,11 @@ public class PrintCommandListener implem
/**
* Create an instance which optionally suppresses login command text
* and indicates where the EOL starts with the specified character.
- *
+ *
* @param writer where to write the commands and responses
* @param suppressLogin if {@code true}, only print command name for login
* @param eolMarker if non-zero, add a marker just before the EOL.
- *
+ *
* @since 3.0
*/
public PrintCommandListener(PrintWriter writer, boolean suppressLogin,
char eolMarker)
@@ -94,7 +94,7 @@ public class PrintCommandListener implem
private String getPrintableString(String msg){
if (__eolMarker == 0) {
- return msg;
+ return msg;
}
int pos = msg.indexOf(SocketClient.NETASCII_EOL);
if (pos > 0) {
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1083063&r1=1083062&r2=1083063&view=diff
==============================================================================
---
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
(original)
+++
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
Fri Mar 18 20:53:29 2011
@@ -1931,7 +1931,7 @@ implements Configurable
/**
* Query the server for a supported feature, and returns its values (if
any).
* Caches the parsed response to avoid resending the command repeatedly.
- *
+ *
* @return if the feature is present, returns the feature values (empty
array if none)
* Returns {@code null} if the feature is not found or the command failed.
* Check {@link #getReplyCode()} or {@link #getReplyString()} if so.
@@ -1948,11 +1948,11 @@ implements Configurable
}
return null;
}
-
+
/**
* Query the server for a supported feature, and returns the its value (if
any).
* Caches the parsed response to avoid resending the command repeatedly.
- *
+ *
* @return if the feature is present, returns the feature value or the
empty string
* if the feature exists but has no value.
* Returns {@code null} if the feature is not found or the command failed.
@@ -1969,14 +1969,14 @@ implements Configurable
}
/**
- * Query the server for a supported feature.
+ * Query the server for a supported feature.
* Caches the parsed response to avoid resending the command repeatedly.
- *
+ *
* @param feature the name of the feature; it is converted to upper case.
* @return {@code true} if the feature is present, {@code false} if the
feature is not present
* or the {@link #feat()} command failed. Check {@link #getReplyCode()} or
{@link #getReplyString()}
* if it is necessary to distinguish these cases.
- *
+ *
* @throws IOException
* @since 3.0
*/
@@ -1989,16 +1989,16 @@ implements Configurable
/**
* Query the server for a supported feature with particular value,
- * for example "AUTH SSL" or "AUTH TLS".
+ * for example "AUTH SSL" or "AUTH TLS".
* Caches the parsed response to avoid resending the command repeatedly.
- *
+ *
* @param feature the name of the feature; it is converted to upper case.
* @param value the value to find.
- *
+ *
* @return {@code true} if the feature is present, {@code false} if the
feature is not present
* or the {@link #feat()} command failed. Check {@link #getReplyCode()} or
{@link #getReplyString()}
* if it is necessary to distinguish these cases.
- *
+ *
* @throws IOException
* @since 3.0
*/
@@ -2021,7 +2021,7 @@ implements Configurable
// Don't create map here, because next line may throw exception
boolean success = FTPReply.isPositiveCompletion(feat());
// we init the map here, so we don't keep trying if we know the
command will fail
- __featuresMap = new HashMap<String, Set<String>>();
+ __featuresMap = new HashMap<String, Set<String>>();
if (!success) {
return false;
}
@@ -2040,12 +2040,12 @@ implements Configurable
Set<String> entries = __featuresMap.get(key);
if (entries == null) {
entries = new HashSet<String>();
- __featuresMap.put(key, entries);
+ __featuresMap.put(key, entries);
}
entries.add(value);
}
}
- }
+ }
return true;
}
@@ -2080,7 +2080,7 @@ implements Configurable
* @return True if successfully completed, false if not, in which case
* call {@link #getReplyCode()} or {@link #getReplyString()}
* to get the reason.
- *
+ *
* @exception IOException If an I/O error occurs while either sending a
* command to the server or receiving a reply from the server.
* @since 3.0
@@ -2101,7 +2101,7 @@ implements Configurable
* @return The array of replies, or {@code null} if the command failed, in
which case
* call {@link #getReplyCode()} or {@link #getReplyString()}
* to get the reason.
- *
+ *
* @exception IOException If an I/O error occurs while either sending a
* command to the server or receiving a reply from the server.
* @since 3.0
@@ -2118,7 +2118,7 @@ implements Configurable
/**
* Get file details using the MLST command
- *
+ *
* @param pathname the file or directory to list, may be {@code} null
* @return the file details, may be {@code null}
* @throws IOException
@@ -2137,7 +2137,7 @@ implements Configurable
/**
* Generate a directory listing using the MSLD command.
- *
+ *
* @param pathname the directory name, may be {@code null}
* @return the array of file entries
* @throws IOException
@@ -2151,7 +2151,7 @@ implements Configurable
/**
* Generate a directory listing using the MSLD command.
- *
+ *
* @param pathname the directory name, may be {@code null}
* @param filter the filter to apply to the responses
* @return the array of file entries
@@ -2964,10 +2964,10 @@ implements Configurable
completePendingCommand();
return engine;
}
-
+
/**
* Initiate list parsing for MLSD listings.
- *
+ *
* @param pathname
* @return the engine
* @throws IOException
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPCommand.java?rev=1083063&r1=1083062&r2=1083063&view=diff
==============================================================================
---
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPCommand.java
(original)
+++
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPCommand.java
Fri Mar 18 20:53:29 2011
@@ -77,14 +77,14 @@ public final class FTPCommand
public static final int EPRT = 37;
/**
- * Machine parseable list for a directory
- * @since 3.0
+ * Machine parseable list for a directory
+ * @since 3.0
*/
public static final int MLSD = 38;
- /**
- * Machine parseable list for a single file
- * @since 3.0
+ /**
+ * Machine parseable list for a single file
+ * @since 3.0
*/
public static final int MLST = 39;
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java?rev=1083063&r1=1083062&r2=1083063&view=diff
==============================================================================
---
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java
(original)
+++
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/MLSxEntryParser.java
Fri Mar 18 20:53:29 2011
@@ -28,13 +28,13 @@ import org.apache.commons.net.ftp.FTPFil
/**
* Parser class for MSLT and MLSD replies.
- *
+ *
* @since 3.0
*/
public class MLSxEntryParser extends FTPFileEntryParserImpl
{
// Format taken from RFC 3659:
-
+
// entry = [ facts ] SP pathname
// facts = 1*( fact ";" )
// fact = factname "=" value
@@ -48,7 +48,7 @@ public class MLSxEntryParser extends FTP
// Sample os-depend-fact:
// UNIX.group=0;UNIX.mode=0755;UNIX.owner=0;
-
+
// A single control response entry (MLST) is returned with a leading space;
// multiple (data) entries are returned without any leading spaces.
@@ -62,7 +62,7 @@ public class MLSxEntryParser extends FTP
TYPE_TO_INT.put("dir", Integer.valueOf(FTPFile.DIRECTORY_TYPE)); //
dir or sub-dir
}
- private static int UNIX_GROUPS[] = { // Groups in order of mode digits
+ private static int UNIX_GROUPS[] = { // Groups in order of mode digits
FTPFile.USER_ACCESS,
FTPFile.GROUP_ACCESS,
FTPFile.WORLD_ACCESS,
@@ -105,11 +105,11 @@ public class MLSxEntryParser extends FTP
// YYYYMMDDHHMMSS[.sss]
SimpleDateFormat sdf; // Not thread-safe
if (factvalue.contains(".")){
- sdf = new SimpleDateFormat("yyyyMMddHHmmss.SSS");
- } else {
+ sdf = new SimpleDateFormat("yyyyMMddHHmmss.SSS");
+ } else {
sdf = new SimpleDateFormat("yyyyMMddHHmmss");
}
-
+
GregorianCalendar gc = new
GregorianCalendar(TimeZone.getTimeZone("GMT")); // TODO are these thread-safe?
try {
gc.setTime(sdf.parse(factvalue));
@@ -131,12 +131,12 @@ public class MLSxEntryParser extends FTP
for(int i=1; i<=3; i++){
int ch = factvalue.charAt(i)-'0';
for(int p : UNIX_PERMS[ch]) {
- file.setPermission(UNIX_GROUPS[i-1], p, true);
+ file.setPermission(UNIX_GROUPS[i-1], p, true);
}
}
file.setUser(factvalue);
}
- }
+ }
else if (!hasUnixMode && "perm".equals(factname)) { // skip if we
have the UNIX.mode
// perm-fact = "Perm" "=" *pvals
// pvals = "a" / "c" / "d" / "e" / "f" /
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLContextUtils.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLContextUtils.java?rev=1083063&r1=1083062&r2=1083063&view=diff
==============================================================================
---
commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLContextUtils.java
(original)
+++
commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SSLContextUtils.java
Fri Mar 18 20:53:29 2011
@@ -13,7 +13,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
*/
package org.apache.commons.net.util;
@@ -33,7 +33,7 @@ public class SSLContextUtils {
private SSLContextUtils() {
// Not instantiable
}
-
+
/**
* Create and initialise sn SSLContext.
* @param protocol the protocol used to instatiate the context
@@ -43,11 +43,11 @@ public class SSLContextUtils {
* @throws IOException this is used to wrap any {@link
GeneralSecurityException} that occurs
*/
public static SSLContext createSSLContext(String protocol, KeyManager
keyManager, TrustManager trustManager) throws IOException {
- return createSSLContext(protocol,
- keyManager == null ? null : new KeyManager[] { keyManager },
+ return createSSLContext(protocol,
+ keyManager == null ? null : new KeyManager[] { keyManager },
trustManager == null ? null : new TrustManager[] {
trustManager });
}
-
+
/**
* Create and initialise sn SSLContext.
* @param protocol the protocol used to instatiate the context
@@ -56,7 +56,7 @@ public class SSLContextUtils {
* @return the initialised context.
* @throws IOException this is used to wrap any {@link
GeneralSecurityException} that occurs
*/
- public static SSLContext createSSLContext(String protocol, KeyManager[]
keyManagers, TrustManager[] trustManagers)
+ public static SSLContext createSSLContext(String protocol, KeyManager[]
keyManagers, TrustManager[] trustManagers)
throws IOException {
SSLContext ctx;
try {
Modified:
commons/proper/net/trunk/src/test/java/org/apache/commons/net/io/DotTerminatedMessageReaderTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/io/DotTerminatedMessageReaderTest.java?rev=1083063&r1=1083062&r2=1083063&view=diff
==============================================================================
---
commons/proper/net/trunk/src/test/java/org/apache/commons/net/io/DotTerminatedMessageReaderTest.java
(original)
+++
commons/proper/net/trunk/src/test/java/org/apache/commons/net/io/DotTerminatedMessageReaderTest.java
Fri Mar 18 20:53:29 2011
@@ -150,7 +150,7 @@ public class DotTerminatedMessageReaderT
}
assertEquals("Hello World#more#",str.toString());
-
+
}
public void testReadLine2() throws Exception {
@@ -164,7 +164,7 @@ public class DotTerminatedMessageReaderT
}
assertEquals("Hello World\r.\nmore#",str.toString());
-
+
}
public void testSingleDotWithTrailingText() throws IOException {