Skip to content

Commit f377137

Browse files
committed
Don't throw IOException when none is required (#206)
This fixes #206 and closes #221
1 parent 67ac243 commit f377137

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static int executeCommandLine( Commandline cl, InputStream systemIn, Stre
110110

111111
/**
112112
* Immediately forks a process, returns a callable that will block until process is complete.
113-
*
113+
*
114114
* @param cl The command line to execute
115115
* @param systemIn The input to read from, must be thread safe
116116
* @param systemOut A consumer that receives output, must be thread safe
@@ -354,12 +354,10 @@ private static void handleException( final StreamFeeder streamFeeder, final Stri
354354
* with case-insensitive environment variables like Windows, all variable names will be normalized to upper case.
355355
*
356356
* @return The shell environment variables, can be empty but never <code>null</code>.
357-
* @throws IOException If the environment variables could not be queried from the shell.
358357
* @see System#getenv() System.getenv() API, new in JDK 5.0, to get the same result <b>since 2.0.2 System#getenv()
359358
* will be used if available in the current running jvm.</b>
360359
*/
361360
public static Properties getSystemEnvVars()
362-
throws IOException
363361
{
364362
return getSystemEnvVars( !Os.isFamily( Os.FAMILY_WINDOWS ) );
365363
}
@@ -370,12 +368,10 @@ public static Properties getSystemEnvVars()
370368
*
371369
* @param caseSensitive Whether environment variable keys should be treated case-sensitively.
372370
* @return Properties object of (possibly modified) envar keys mapped to their values.
373-
* @throws IOException .
374371
* @see System#getenv() System.getenv() API, new in JDK 5.0, to get the same result <b>since 2.0.2 System#getenv()
375372
* will be used if available in the current running jvm.</b>
376373
*/
377374
public static Properties getSystemEnvVars( boolean caseSensitive )
378-
throws IOException
379375
{
380376
Properties envVars = new Properties();
381377
Map<String, String> envs = System.getenv();

0 commit comments

Comments
 (0)