Boolean b = AccessController.doPrivileged
(new GetBooleanAction("boolean")); if (b.booleanValue() == true) {
System.out.println("boolean test passed");
} else { thrownew SecurityException("boolean test failed");
}
Integer i = AccessController.doPrivileged
(new GetIntegerAction("integer")); if (i.intValue() == 9) {
System.out.println("integer test passed");
} else { thrownew SecurityException("integer test failed");
}
Long l = AccessController.doPrivileged
(new GetLongAction("long")); if (l.longValue() == larg) {
System.out.println("long test passed");
} else { thrownew SecurityException("long test failed");
}
String prop = AccessController.doPrivileged
(new GetPropertyAction("property")); if (prop.equals("propertyvalue")) {
System.out.println("property test passed");
} else { thrownew SecurityException("property test failed");
}
File f = new File(System.getProperty("test.src", "."), "Generify.java");
FileInputStream fis = AccessController.doPrivileged
(new OpenFileInputStreamAction(f)); if (fis != null) {
System.out.println("file test passed");
} else { thrownew SecurityException("file test failed");
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(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.