long recId = bean.newRecording();
bean.startRecording(recId);
SimpleEventHelper.createEvent(1);
bean.stopRecording(recId);
Path readOnlyDir = FileHelper.createReadOnlyDir(Paths.get(".", "readOnlyDir"));
System.out.println("readOnlyDir=" + readOnlyDir.toString());
Asserts.assertTrue(readOnlyDir.toFile().isDirectory(), "Could not create directory. Test error"); if (!FileHelper.isReadOnlyPath(readOnlyDir)) {
System.out.println("Failed to create read-only dir. Maybe running as root? Skipping test"); return;
}
Path file = Paths.get(readOnlyDir.toString(), "my.jfr");
System.out.println("file=" + file.toString()); try {
bean.copyTo(recId, file.toString());
Asserts.fail("Should be able to dump to read only file");
} catch (AccessDeniedException e) { // ok as expected
}
bean.closeRecording(recId);
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 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.