From: Gary Benson <gbenson@redhat.com>
To: mauve-patches@sources.redhat.com
Subject: FYI: Another throwpoint check java.net.URL
Date: Wed, 11 Oct 2006 14:08:00 -0000 [thread overview]
Message-ID: <20061011140807.GE24565@redhat.com> (raw)
In-Reply-To: <20061011134859.GD24565@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 14 bytes --]
Missed one :)
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1766 bytes --]
Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1951
diff -u -r1.1951 ChangeLog
--- ChangeLog 11 Oct 2006 13:48:21 -0000 1.1951
+++ ChangeLog 11 Oct 2006 14:05:43 -0000
@@ -1,3 +1,7 @@
+2006-10-11 Gary Benson <gbenson@redhat.com>
+
+ * gnu/testlet/java/net/URL/security.java: Add a test I missed.
+
2006-10-11 Gary Benson <gbenson@redhat.com>
* gnu/testlet/java/net/URL/security.java: New test.
Index: gnu/testlet/java/net/URL/security.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/URL/security.java,v
retrieving revision 1.1
diff -u -r1.1 security.java
--- gnu/testlet/java/net/URL/security.java 11 Oct 2006 13:48:21 -0000 1.1
+++ gnu/testlet/java/net/URL/security.java 11 Oct 2006 14:05:43 -0000
@@ -43,6 +43,9 @@
Permission[] specifyStreamHandler = new Permission[] {
new NetPermission("specifyStreamHandler")};
+ Permission[] checkSetFactory = new Permission[] {
+ new RuntimePermission("setFactory")};
+
TestSecurityManager sm = new TestSecurityManager(harness);
try {
sm.install();
@@ -70,6 +73,21 @@
harness.debug(ex);
harness.check(false, "unexpected check");
}
+
+ // throwpoint: java.net.URL-setURLStreamHandlerFactory
+ harness.checkPoint("setURLStreamHandlerFactory");
+ try {
+ sm.prepareHaltingChecks(checkSetFactory);
+ URL.setURLStreamHandlerFactory(null);
+ harness.check(false);
+ }
+ catch (TestSecurityManager.SuccessException ex) {
+ harness.check(true);
+ }
+ catch (SecurityException ex) {
+ harness.debug(ex);
+ harness.check(false, "unexpected check");
+ }
}
finally {
sm.uninstall();
prev parent reply other threads:[~2006-10-11 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 13:49 FYI: Throwpoint checks for java.net.URL Gary Benson
2006-10-11 14:08 ` Gary Benson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061011140807.GE24565@redhat.com \
--to=gbenson@redhat.com \
--cc=mauve-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).