publicclass NullArguments { publicstaticvoid main(String[] args) {
ProxySelector ps = ProxySelector.getDefault();
List p = null; boolean ok = false; if (ps != null) { try {
p = ps.select(null);
} catch (IllegalArgumentException iae) {
System.out.println("OK");
ok = true;
} if (!ok) thrownew RuntimeException("Expected IllegalArgumentException!");
URI uri = null; try {
uri = new URI("http://java.sun.com");
} catch (java.net.URISyntaxException use) { // can't happen
}
SocketAddress sa = new InetSocketAddress("localhost", 80);
IOException ioe = new IOException("dummy IOE");
ok = false; try {
ps.connectFailed(uri, sa, null);
} catch (IllegalArgumentException iae) {
System.out.println("OK");
ok = true;
} if (!ok) thrownew RuntimeException("Expected IllegalArgumentException!");
ok = false; try {
ps.connectFailed(uri, null, ioe);
} catch (IllegalArgumentException iae) {
System.out.println("OK");
ok = true;
} if (!ok) thrownew RuntimeException("Expected IllegalArgumentException!");
ok = false; try {
ps.connectFailed(null, sa, ioe);
} catch (IllegalArgumentException iae) {
System.out.println("OK");
ok = true;
} if (!ok) thrownew RuntimeException("Expected IllegalArgumentException!");
}
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.