@Test publicvoid positive() { // ArrayIndexOutOfBoundsException is the bug, 4391898, exists
SocketPermission sp1 = new SocketPermission(":", "connect");
}
@Test publicvoid npe() {
NullPointerException e;
e = expectThrows(NPE, () -> new SocketPermission(null, null));
out.println("caught expected NPE: " + e);
e = expectThrows(NPE, () -> new SocketPermission("foo", null));
out.println("caught expected NPE: " + e);
e = expectThrows(NPE, () -> new SocketPermission(null, "connect"));
out.println("caught expected NPE: " + e);
}
@Test publicvoid iae() {
IllegalArgumentException e; // host
e = expectThrows(IAE, () -> new SocketPermission("1:2:3:4", "connect"));
out.println("caught expected IAE: " + e);
e = expectThrows(IAE, () -> new SocketPermission("foo:5-4", "connect"));
out.println("caught expected IAE: " + e);
// actions
e = expectThrows(IAE, () -> new SocketPermission("foo", ""));
out.println("caught expected IAE: " + e);
e = expectThrows(IAE, () -> new SocketPermission("foo", "badAction"));
out.println("caught expected IAE: " + e);
e = expectThrows(IAE, () -> new SocketPermission("foo", "badAction,connect"));
out.println("caught expected IAE: " + e);
e = expectThrows(IAE, () -> new SocketPermission("foo", "badAction,,connect"));
out.println("caught expected IAE: " + e);
e = expectThrows(IAE, () -> new SocketPermission("foo", ",connect"));
out.println("caught expected IAE: " + e);
e = expectThrows(IAE, () -> new SocketPermission("foo", ",,connect"));
out.println("caught expected IAE: " + e);
e = expectThrows(IAE, () -> new SocketPermission("foo", "connect,"));
out.println("caught expected IAE: " + e);
e = expectThrows(IAE, () -> new SocketPermission("foo", "connect,,"));
out.println("caught expected IAE: " + e);
}
}
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.1Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
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.