From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24262 invoked by alias); 11 Oct 2006 14:08:20 -0000 Received: (qmail 24252 invoked by uid 22791); 11 Oct 2006 14:08:19 -0000 X-Spam-Check-By: sourceware.org Received: from gbenson.demon.co.uk (HELO gbenson.demon.co.uk) (80.177.220.214) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Oct 2006 14:08:15 +0000 Received: from mambo.wire.rat ([192.168.1.6]) by gbenson.demon.co.uk with esmtp (Exim 3.36 #1) id 1GXekk-0004U1-00; Wed, 11 Oct 2006 15:08:10 +0100 Received: from mambo.wire.rat (localhost.localdomain [127.0.0.1]) by mambo.wire.rat (8.13.7/8.13.6) with ESMTP id k9BE8ANS028092; Wed, 11 Oct 2006 15:08:10 +0100 Received: (from gary@localhost) by mambo.wire.rat (8.13.7/8.13.7/Submit) id k9BE8AgX028091; Wed, 11 Oct 2006 15:08:10 +0100 Date: Wed, 11 Oct 2006 14:08:00 -0000 From: Gary Benson To: mauve-patches@sources.redhat.com Subject: FYI: Another throwpoint check java.net.URL Message-ID: <20061011140807.GE24565@redhat.com> Mail-Followup-To: mauve-patches@sources.redhat.com References: <20061011134859.GD24565@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DIOMP1UsTsWJauNi" Content-Disposition: inline In-Reply-To: <20061011134859.GD24565@redhat.com> X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2006/txt/msg00695.txt.bz2 --DIOMP1UsTsWJauNi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 14 Missed one :) --DIOMP1UsTsWJauNi Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch Content-length: 1766 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 + + * gnu/testlet/java/net/URL/security.java: Add a test I missed. + 2006-10-11 Gary Benson * 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(); --DIOMP1UsTsWJauNi--