sources.am, [...]: Rebuilt.

* sources.am, Makefile.in: Rebuilt.
	* scripts/makemake.tcl (emit_package_rule): Don't omit
	VMProcess.java.
	* Makefile.am (nat_source_files): Added natVMProcess.cc.
	(inner_nat_headers): Added ImmediateEOFInputStream.h.
	* gcj/javaprims.h: Regenerated.
	* java/lang/System.java (EnvironmentMap): Now package-private.
	(EnvironmentMap(Map)): New constructor.
	(EnvironmentMap.put): New method.
	* java/lang/natWin32Process.cc (startProcess): Update.
	* java/lang/Win32Process.java (Win32Process): Added 'redirect'
	argument.
	(startProcess): Likewise.
	* java/lang/EcosProcess.java (EcosProcess): Added 'redirect'
	argument.
	* java/lang/natPosixProcess.cc (nativeSpawn): Handle redirection.
	* java/lang/PosixProcess.java (redirect): New field.
	(PosixProcess): Added 'redirect' argument.
	* java/lang/natRuntime.cc (execInternal): Added 'redirect'
	argument to Process creation.
	* java/lang/natVMProcess.cc: New file.
	* java/lang/ProcessBuilder.java: Removed.
	* java/lang/VMProcess.java: New file.

From-SVN: r122553
This commit is contained in:
Tom Tromey
2007-03-05 15:57:13 +00:00
committed by Tom Tromey
parent 344189f9ec
commit f4a2a1deec
29 changed files with 233 additions and 127 deletions
+41 -3
View File
@@ -828,7 +828,7 @@ public final class System
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
*/
private static class EnvironmentMap
static class EnvironmentMap
extends HashMap<String,String>
{
@@ -854,7 +854,20 @@ public final class System
{
super();
}
/**
* Constructs a new <code>EnvironmentMap</code> containing
* the contents of the specified map.
*
* @param m the map to be added to this.
* @throws NullPointerException if a key or value is null.
* @throws ClassCastException if a key or value is not a String.
*/
EnvironmentMap(Map<String,String> m)
{
super(m);
}
/**
* Blocks queries containing a null key or one which is not
* of type <code>String</code>. All other queries
@@ -939,7 +952,32 @@ public final class System
keys = new EnvironmentSet(super.keySet());
return keys;
}
/**
* Associates the given key to the given value. If the
* map already contains the key, its value is replaced.
* The map does not accept null keys or values, or keys
* and values not of type {@link String}.
*
* @param key the key to map.
* @param value the value to be mapped.
* @return the previous value of the key, or null if there was no mapping
* @throws NullPointerException if a key or value is null.
* @throws ClassCastException if a key or value is not a String.
*/
public String put(String key, String value)
{
if (key == null)
throw new NullPointerException("A new key is null.");
if (value == null)
throw new NullPointerException("A new value is null.");
if (!(key instanceof String))
throw new ClassCastException("A new key is not a String.");
if (!(value instanceof String))
throw new ClassCastException("A new value is not a String.");
return super.put(key, value);
}
/**
* Removes a key-value pair from the map. The queried key may not
* be null or of a type other than a <code>String</code>.