Name: skR10005 Date: 10/15/2003
The following new api tests fail on JDK1.5.0-b23:
api/java_lang/ProcessBuilder/index.html#command3[command3001]
api/java_lang/ProcessBuilder/index.html#command3[command3002]
The API specification of the method ProcessBuilder.command() does not
specify that returned List may reject adding new elements.
The following simple test can be used to reproduce the failure:
===============================test.java=======================
public class test {
public static void main(String[] argv) {
ProcessBuilder pb = new ProcessBuilder();
pb.command().add("anything");
}
}
===============================================================
$ javac -d . -source 1.5 test.java
$ java -version
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b23)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b23, mixed mode)
$ java -cp . test
Exception in thread "main" java.lang.UnsupportedOperationException
at java.util.AbstractList.add(AbstractList.java:151)
at java.util.AbstractList.add(AbstractList.java:89)
at test.main(test.java:4)
$
======================================================================