svn commit: r746291 - /commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java

2009-02-20 Thread bodewig
Author: bodewig
Date: Fri Feb 20 16:46:37 2009
New Revision: 746291

URL: http://svn.apache.org/viewvc?rev=746291view=rev
Log:
separate unicode tests with and without EFS flag

Modified:

commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java

Modified: 
commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java?rev=746291r1=746290r2=746291view=diff
==
--- 
commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
 (original)
+++ 
commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
 Fri Feb 20 16:46:37 2009
@@ -37,19 +37,22 @@
 private static final String OIL_BARREL_TXT = \u00D6lf\u00E4sser.txt;
 
 public void testUtf8FileRoundtrip() throws IOException {
-testFileRoundtrip(UTF_8);
+testFileRoundtrip(UTF_8, true);
 }
 
+public void testUtf8FileRoundtripNoEFS() throws IOException {
+testFileRoundtrip(UTF_8, false);
+}
 
 public void testCP437FileRoundtrip() throws IOException {
-testFileRoundtrip(CP437);
+testFileRoundtrip(CP437, false);
 }
 
 public void testASCIIFileRoundtrip() throws IOException {
-testFileRoundtrip(US_ASCII);
+testFileRoundtrip(US_ASCII, false);
 }
 
-private static void testFileRoundtrip(String encoding)
+private static void testFileRoundtrip(String encoding, boolean withEFS)
 throws IOException {
 
 try {
@@ -62,7 +65,7 @@
 
 File file = File.createTempFile(encoding + -test, .zip);
 try {
-createTestFile(file, encoding);
+createTestFile(file, encoding, withEFS);
 testFile(file, encoding);
 } finally {
 if (file.exists()) {
@@ -71,13 +74,15 @@
 }
 }
 
-private static void createTestFile(File file, String encoding)
+private static void createTestFile(File file, String encoding,
+   boolean withEFS)
 throws UnsupportedEncodingException, IOException {
 
 ZipArchiveOutputStream zos = null;
 try {
 zos = new ZipArchiveOutputStream(file);
 zos.setEncoding(encoding);
+zos.setUseEFS(withEFS);
 
 ZipArchiveEntry ze = new ZipArchiveEntry(OIL_BARREL_TXT);
 if (!ZipEncodingHelper.canEncodeName(ze.getName(),




svn commit: r746307 - /commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java

2009-02-20 Thread sgoeschl
Author: sgoeschl
Date: Fri Feb 20 17:52:51 2009
New Revision: 746307

URL: http://svn.apache.org/viewvc?rev=746307view=rev
Log:
Cleaned up javadocs 

Modified:

commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java

Modified: 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java?rev=746307r1=746306r2=746307view=diff
==
--- 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java 
(original)
+++ 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java 
Fri Feb 20 17:52:51 2009
@@ -46,7 +46,7 @@
 
 public interface Executor {
 
-/** Invalid exit code. * */
+/** Invalid exit code. */
 int INVALID_EXITVALUE = 0xdeadbeef;
 
 /**
@@ -65,6 +65,7 @@
  *  lian empty array for auto-detect of successful exit codes/li
  *  linull to indicate to skip checking of exit codes/li
  * /ul
+ *
  * @param values a list of the exit codes
  */
 void setExitValues(final int[] values);
@@ -81,30 +82,67 @@
 boolean isFailure(final int exitValue);
 
 /**
- * StreamHandlers are used for providing input, 
- * retriving the output. Also used for logging.  
+ * Get the StreamHandler used for providing input and
+ * retriving the output.
+ * 
+ * @return the StreamHandler 
  */
 ExecuteStreamHandler getStreamHandler();
+
+/**
+ * Set the StreamHandler used for providing input and
+ * retriving the output.
+ *
+ * @param streamHandler the StreamHandler
+ */
+
 void setStreamHandler(ExecuteStreamHandler streamHandler);
 
 /**
- * Watchdog is used to kill of processes running, 
- * typically, too long time. 
+ * Get the watchdog used to kill of processes running,
+ * typically, too long time.
+ *
+ * @return the watchdog
  */
 ExecuteWatchdog getWatchdog();
+
+/**
+ * Set the watchdog used to kill of processes running, 
+ * typically, too long time.
+ *
+ * @param watchDog the watchdog
+ */
 void setWatchdog(ExecuteWatchdog watchDog);
 
 /**
- * Optinal cleanup of started processes if the main process
+ * Set the handler for cleanup of started processes if the main process
  * is going to terminate.
+ *
+ * @return the ProcessDestroyer
  */
 ProcessDestroyer getProcessDestroyer();
+
+/**
+ * Get the handler for cleanup of started processes if the main process
+ * is going to terminate.
+ *
+ * @param processDestroyer the ProcessDestroyer
+ */
 void setProcessDestroyer(ProcessDestroyer processDestroyer);
 
 /**
- * Set the working directory of the created process.
+ * Get the working directory of the created process.
+ *
+ * @return the working directory
  */
 File getWorkingDirectory();
+
+/**
+ * Set the working directory of the created process. The
+ * working directory must exist when you start the process.
+ *
+ * @param dir the working directory
+ */
 void setWorkingDirectory(File dir);
 
 /**
@@ -115,18 +153,20 @@
  * @return process exit value
  * @throws ExecuteException execution of subprocess failed
  */
-int execute(CommandLine command) throws ExecuteException, IOException;
+int execute(CommandLine command)
+throws ExecuteException, IOException;
 
 /**
  * Methods for starting synchronous execution.
  *
  * @param command the command to execute
- * @param environment The environment for the new process. If null, the 
environment
- *  of the current process is used.
+ * @param environment The environment for the new process. If null, the
+ *  environment of the current process is used.
  * @return process exit value
  * @throws ExecuteException execution of subprocess failed
  */
-int execute(CommandLine command, Map environment) throws ExecuteException, 
IOException;
+int execute(CommandLine command, Map environment)
+throws ExecuteException, IOException;
 
 /**
  * Methods for starting asynchronous execution. The child process inherits
@@ -137,7 +177,8 @@
  * @param handler capture process termination and exit code
  * @throws ExecuteException execution of subprocess failed
  */
-void execute(CommandLine command, ExecuteResultHandler handler) throws 
ExecuteException, IOException;
+void execute(CommandLine command, ExecuteResultHandler handler)
+throws ExecuteException, IOException;
 
 /**
  * Methods for starting asynchronous execution. The child process inherits
@@ -145,10 +186,11 @@
  * callback handler.
  *
  * @param command the command to execute
- * @param environment The 

svn commit: r746314 - /commons/proper/exec/trunk/pom.xml

2009-02-20 Thread sgoeschl
Author: sgoeschl
Date: Fri Feb 20 18:07:09 2009
New Revision: 746314

URL: http://svn.apache.org/viewvc?rev=746314view=rev
Log:
Added issueManagement section

Modified:
commons/proper/exec/trunk/pom.xml

Modified: commons/proper/exec/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/pom.xml?rev=746314r1=746313r2=746314view=diff
==
--- commons/proper/exec/trunk/pom.xml (original)
+++ commons/proper/exec/trunk/pom.xml Fri Feb 20 18:07:09 2009
@@ -31,6 +31,11 @@
   descriptionA library to reliably execute external processes from within 
the JVM/description
   urlhttp://commons.apache.org/exec//url  
   
+  issueManagement
+  systemjira/system
+  urlhttp://issues.apache.org/jira/browse/EXEC/url
+  /issueManagement
+
   dependencies
dependency
   groupIdjunit/groupId




svn commit: r746315 - /commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java

2009-02-20 Thread sgoeschl
Author: sgoeschl
Date: Fri Feb 20 18:07:57 2009
New Revision: 746315

URL: http://svn.apache.org/viewvc?rev=746315view=rev
Log:
Cleaned up the javadocs ...

Modified:

commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java

Modified: 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java?rev=746315r1=746314r2=746315view=diff
==
--- 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
 (original)
+++ 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java
 Fri Feb 20 18:07:57 2009
@@ -54,9 +54,7 @@
 /**
  * Create a command line from a string.
  * 
- * @param line
- *the line: the first element becomes the executable, the rest
- *the arguments
+ * @param line the first element becomes the executable, the rest the 
arguments
  * @return the parsed command line
  * @throws IllegalArgumentException If line is null or all whitespace
  */
@@ -67,9 +65,7 @@
 /**
  * Create a command line from a string.
  *
- * @param line
- *the line: the first element becomes the executable, the rest
- *the arguments
+ * @param line the first element becomes the executable, the rest the 
arguments
  * @param substitutionMap the name/value pairs used for substitution
  * @return the parsed command line
  * @throws IllegalArgumentException If line is null or all whitespace
@@ -240,7 +236,8 @@
 
 /**
  * Set the substitutionMap to expand variables in the
- * command line
+ * command line.
+ * 
  * @param substitutionMap the map
  */
 public void setSubstitutionMap(Map substitutionMap) {




svn commit: r746316 - /commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java

2009-02-20 Thread sgoeschl
Author: sgoeschl
Date: Fri Feb 20 18:08:11 2009
New Revision: 746316

URL: http://svn.apache.org/viewvc?rev=746316view=rev
Log:
Cleaned up the javadocs ...

Modified:

commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java

Modified: 
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java?rev=746316r1=746315r2=746316view=diff
==
--- 
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
 (original)
+++ 
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/DefaultExecutorTest.java
 Fri Feb 20 18:08:11 2009
@@ -374,7 +374,7 @@
 /**
  * Start a process and connect stdin, stdout and stderr. This
  * test currenty hang. Therefore we throw an IllegalArgument
- * Exception to notify the user.
+ * Exception to notify the user (see EXEC-33).
  */
 public void testExecuteWithStdin() throws Exception
 {