commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r855119 [9/11] - in /websites/production/commons/content/proper/commons-logging: ./ apidocs/ apidocs/org/apache/commons/logging/ apidocs/org/apache/commons/logging/class-use/ apidocs/org/apache/commons/logging/impl/ apidocs/org/apache/commo...
Date Tue, 19 Mar 2013 21:07:36 GMT
Modified: websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/logfactory/package-use.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/logfactory/package-use.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/logfactory/package-use.html Tue Mar 19 21:07:31 2013
@@ -3,13 +3,13 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>Uses of Package org.apache.commons.logging.tccl.logfactory (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>Uses of Package org.apache.commons.logging.tccl.logfactory (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
 </head>
 <body>
 <script type="text/javascript"><!--
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.apache.commons.logging.tccl.logfactory (Commons Logging 1.1.2-SNAPSHOT Test API)";
+        parent.document.title="Uses of Package org.apache.commons.logging.tccl.logfactory (Commons Logging 1.1.2 Test API)";
     }
 //-->
 </script>

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-frame.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-frame.html Tue Mar 19 21:07:31 2013
@@ -3,7 +3,7 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>org.apache.commons.logging.tccl (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>org.apache.commons.logging.tccl (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
 </head>
 <body>

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-summary.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-summary.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-summary.html Tue Mar 19 21:07:31 2013
@@ -3,13 +3,13 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>org.apache.commons.logging.tccl (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>org.apache.commons.logging.tccl (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
 </head>
 <body>
 <script type="text/javascript"><!--
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.apache.commons.logging.tccl (Commons Logging 1.1.2-SNAPSHOT Test API)";
+        parent.document.title="org.apache.commons.logging.tccl (Commons Logging 1.1.2 Test API)";
     }
 //-->
 </script>

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-tree.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-tree.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-tree.html Tue Mar 19 21:07:31 2013
@@ -3,13 +3,13 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>org.apache.commons.logging.tccl Class Hierarchy (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>org.apache.commons.logging.tccl Class Hierarchy (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
 </head>
 <body>
 <script type="text/javascript"><!--
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.apache.commons.logging.tccl Class Hierarchy (Commons Logging 1.1.2-SNAPSHOT Test API)";
+        parent.document.title="org.apache.commons.logging.tccl Class Hierarchy (Commons Logging 1.1.2 Test API)";
     }
 //-->
 </script>

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-use.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-use.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/org/apache/commons/logging/tccl/package-use.html Tue Mar 19 21:07:31 2013
@@ -3,13 +3,13 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>Uses of Package org.apache.commons.logging.tccl (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>Uses of Package org.apache.commons.logging.tccl (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
 </head>
 <body>
 <script type="text/javascript"><!--
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.apache.commons.logging.tccl (Commons Logging 1.1.2-SNAPSHOT Test API)";
+        parent.document.title="Uses of Package org.apache.commons.logging.tccl (Commons Logging 1.1.2 Test API)";
     }
 //-->
 </script>

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/overview-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/overview-frame.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/overview-frame.html Tue Mar 19 21:07:31 2013
@@ -3,7 +3,7 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>Overview List (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>Overview List (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
 </head>
 <body>

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/overview-summary.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/overview-summary.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/overview-summary.html Tue Mar 19 21:07:31 2013
@@ -3,13 +3,13 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>Overview (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>Overview (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
 </head>
 <body>
 <script type="text/javascript"><!--
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Overview (Commons Logging 1.1.2-SNAPSHOT Test API)";
+        parent.document.title="Overview (Commons Logging 1.1.2 Test API)";
     }
 //-->
 </script>
@@ -62,7 +62,7 @@
 </a></div>
 <!-- ========= END OF TOP NAVBAR ========= -->
 <div class="header">
-<h1 class="title">Commons Logging 1.1.2-SNAPSHOT Test API</h1>
+<h1 class="title">Commons Logging 1.1.2 Test API</h1>
 </div>
 <div class="contentContainer">
 <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Packages table, listing packages, and an explanation">

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/overview-tree.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/overview-tree.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/overview-tree.html Tue Mar 19 21:07:31 2013
@@ -3,13 +3,13 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>Class Hierarchy (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>Class Hierarchy (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
 </head>
 <body>
 <script type="text/javascript"><!--
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Class Hierarchy (Commons Logging 1.1.2-SNAPSHOT Test API)";
+        parent.document.title="Class Hierarchy (Commons Logging 1.1.2 Test API)";
     }
 //-->
 </script>

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/serialized-form.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/serialized-form.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/serialized-form.html Tue Mar 19 21:07:31 2013
@@ -3,13 +3,13 @@
 <html lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
-<title>Serialized Form (Commons Logging 1.1.2-SNAPSHOT Test API)</title>
+<title>Serialized Form (Commons Logging 1.1.2 Test API)</title>
 <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
 </head>
 <body>
 <script type="text/javascript"><!--
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Serialized Form (Commons Logging 1.1.2-SNAPSHOT Test API)";
+        parent.document.title="Serialized Form (Commons Logging 1.1.2 Test API)";
     }
 //-->
 </script>

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/impl/WeakHashtableTestCase.StupidThread.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/impl/WeakHashtableTestCase.StupidThread.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/impl/WeakHashtableTestCase.StupidThread.html Tue Mar 19 21:07:31 2013
@@ -228,90 +228,97 @@
 <span class="sourceLineNo">220</span>        assertTrue(values.contains(valueThree));<a name="line.220"></a>
 <span class="sourceLineNo">221</span>    }<a name="line.221"></a>
 <span class="sourceLineNo">222</span><a name="line.222"></a>
-<span class="sourceLineNo">223</span>    public void testRelease() throws Exception {<a name="line.223"></a>
-<span class="sourceLineNo">224</span>        assertNotNull(weakHashtable.get(new Long(1)));<a name="line.224"></a>
-<span class="sourceLineNo">225</span>        ReferenceQueue testQueue = new ReferenceQueue();<a name="line.225"></a>
-<span class="sourceLineNo">226</span>        WeakReference weakKeyOne = new WeakReference(keyOne, testQueue);<a name="line.226"></a>
-<span class="sourceLineNo">227</span><a name="line.227"></a>
-<span class="sourceLineNo">228</span>        // lose our references<a name="line.228"></a>
-<span class="sourceLineNo">229</span>        keyOne = null;<a name="line.229"></a>
-<span class="sourceLineNo">230</span>        keyTwo = null;<a name="line.230"></a>
-<span class="sourceLineNo">231</span>        keyThree = null;<a name="line.231"></a>
-<span class="sourceLineNo">232</span>        valueOne = null;<a name="line.232"></a>
-<span class="sourceLineNo">233</span>        valueTwo = null;<a name="line.233"></a>
-<span class="sourceLineNo">234</span>        valueThree = null;<a name="line.234"></a>
-<span class="sourceLineNo">235</span><a name="line.235"></a>
-<span class="sourceLineNo">236</span>        int iterations = 0;<a name="line.236"></a>
-<span class="sourceLineNo">237</span>        int bytz = 2;<a name="line.237"></a>
-<span class="sourceLineNo">238</span>        while(true) {<a name="line.238"></a>
-<span class="sourceLineNo">239</span>            System.gc();<a name="line.239"></a>
-<span class="sourceLineNo">240</span>            if(iterations++ &gt; MAX_GC_ITERATIONS){<a name="line.240"></a>
-<span class="sourceLineNo">241</span>                fail("Max iterations reached before resource released.");<a name="line.241"></a>
-<span class="sourceLineNo">242</span>            }<a name="line.242"></a>
-<span class="sourceLineNo">243</span><a name="line.243"></a>
-<span class="sourceLineNo">244</span>            if(weakHashtable.get(new Long(1)) == null) {<a name="line.244"></a>
-<span class="sourceLineNo">245</span>                break;<a name="line.245"></a>
-<span class="sourceLineNo">246</span><a name="line.246"></a>
-<span class="sourceLineNo">247</span>            } else {<a name="line.247"></a>
-<span class="sourceLineNo">248</span>                // create garbage:<a name="line.248"></a>
-<span class="sourceLineNo">249</span>                byte[] b =  new byte[bytz];<a name="line.249"></a>
-<span class="sourceLineNo">250</span>                bytz = bytz * 2;<a name="line.250"></a>
-<span class="sourceLineNo">251</span>            }<a name="line.251"></a>
-<span class="sourceLineNo">252</span>        }<a name="line.252"></a>
+<span class="sourceLineNo">223</span>    /**<a name="line.223"></a>
+<span class="sourceLineNo">224</span>     * Disabled this test as it makes wrong assumptions wrt the GC.<a name="line.224"></a>
+<span class="sourceLineNo">225</span>     * This test especially fails with:<a name="line.225"></a>
+<span class="sourceLineNo">226</span>     *<a name="line.226"></a>
+<span class="sourceLineNo">227</span>     * Java(TM) SE Runtime Environment (build pxi3260sr12-20121025_01(SR12))<a name="line.227"></a>
+<span class="sourceLineNo">228</span>     * IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr12-20121024_1<a name="line.228"></a>
+<span class="sourceLineNo">229</span>     */<a name="line.229"></a>
+<span class="sourceLineNo">230</span>    public void xxxIgnoretestRelease() throws Exception {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        assertNotNull(weakHashtable.get(new Long(1)));<a name="line.231"></a>
+<span class="sourceLineNo">232</span>        ReferenceQueue testQueue = new ReferenceQueue();<a name="line.232"></a>
+<span class="sourceLineNo">233</span>        WeakReference weakKeyOne = new WeakReference(keyOne, testQueue);<a name="line.233"></a>
+<span class="sourceLineNo">234</span><a name="line.234"></a>
+<span class="sourceLineNo">235</span>        // lose our references<a name="line.235"></a>
+<span class="sourceLineNo">236</span>        keyOne = null;<a name="line.236"></a>
+<span class="sourceLineNo">237</span>        keyTwo = null;<a name="line.237"></a>
+<span class="sourceLineNo">238</span>        keyThree = null;<a name="line.238"></a>
+<span class="sourceLineNo">239</span>        valueOne = null;<a name="line.239"></a>
+<span class="sourceLineNo">240</span>        valueTwo = null;<a name="line.240"></a>
+<span class="sourceLineNo">241</span>        valueThree = null;<a name="line.241"></a>
+<span class="sourceLineNo">242</span><a name="line.242"></a>
+<span class="sourceLineNo">243</span>        int iterations = 0;<a name="line.243"></a>
+<span class="sourceLineNo">244</span>        int bytz = 2;<a name="line.244"></a>
+<span class="sourceLineNo">245</span>        while(true) {<a name="line.245"></a>
+<span class="sourceLineNo">246</span>            System.gc();<a name="line.246"></a>
+<span class="sourceLineNo">247</span>            if(iterations++ &gt; MAX_GC_ITERATIONS){<a name="line.247"></a>
+<span class="sourceLineNo">248</span>                fail("Max iterations reached before resource released.");<a name="line.248"></a>
+<span class="sourceLineNo">249</span>            }<a name="line.249"></a>
+<span class="sourceLineNo">250</span><a name="line.250"></a>
+<span class="sourceLineNo">251</span>            if(weakHashtable.get(new Long(1)) == null) {<a name="line.251"></a>
+<span class="sourceLineNo">252</span>                break;<a name="line.252"></a>
 <span class="sourceLineNo">253</span><a name="line.253"></a>
-<span class="sourceLineNo">254</span>        // some JVMs seem to take a little time to put references on<a name="line.254"></a>
-<span class="sourceLineNo">255</span>        // the reference queue once the reference has been collected<a name="line.255"></a>
-<span class="sourceLineNo">256</span>        // need to think about whether this is enough to justify<a name="line.256"></a>
-<span class="sourceLineNo">257</span>        // stepping through the collection each time...<a name="line.257"></a>
-<span class="sourceLineNo">258</span>        while(testQueue.poll() == null) {}<a name="line.258"></a>
-<span class="sourceLineNo">259</span><a name="line.259"></a>
-<span class="sourceLineNo">260</span>        // Test that the released objects are not taking space in the table<a name="line.260"></a>
-<span class="sourceLineNo">261</span>        assertEquals("underlying table not emptied", 0, weakHashtable.size());<a name="line.261"></a>
-<span class="sourceLineNo">262</span>    }<a name="line.262"></a>
-<span class="sourceLineNo">263</span><a name="line.263"></a>
-<span class="sourceLineNo">264</span>    public static class StupidThread extends Thread {<a name="line.264"></a>
-<span class="sourceLineNo">265</span><a name="line.265"></a>
-<span class="sourceLineNo">266</span>        public StupidThread(String name) {<a name="line.266"></a>
-<span class="sourceLineNo">267</span>            super(name);<a name="line.267"></a>
-<span class="sourceLineNo">268</span>        }<a name="line.268"></a>
-<span class="sourceLineNo">269</span><a name="line.269"></a>
-<span class="sourceLineNo">270</span>        public void run() {<a name="line.270"></a>
-<span class="sourceLineNo">271</span>            for (int i = 0; i &lt; RUN_LOOPS; i++) {<a name="line.271"></a>
-<span class="sourceLineNo">272</span>                hashtable.put("key" + ":" + i%10, Boolean.TRUE);<a name="line.272"></a>
-<span class="sourceLineNo">273</span>                if(i%50 == 0) {<a name="line.273"></a>
-<span class="sourceLineNo">274</span>                    yield();<a name="line.274"></a>
-<span class="sourceLineNo">275</span>                }<a name="line.275"></a>
-<span class="sourceLineNo">276</span>            }<a name="line.276"></a>
-<span class="sourceLineNo">277</span>        }<a name="line.277"></a>
-<span class="sourceLineNo">278</span>    }<a name="line.278"></a>
-<span class="sourceLineNo">279</span><a name="line.279"></a>
-<span class="sourceLineNo">280</span>    public void testLOGGING_119() throws Exception {<a name="line.280"></a>
-<span class="sourceLineNo">281</span>        Thread [] t = new Thread[THREAD_COUNT];<a name="line.281"></a>
-<span class="sourceLineNo">282</span>        for (int j=1; j &lt;= OUTER_LOOP; j++) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>            hashtable = new WeakHashtable();<a name="line.283"></a>
-<span class="sourceLineNo">284</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.284"></a>
-<span class="sourceLineNo">285</span>                t[i] = new StupidThread("Thread:" + i);<a name="line.285"></a>
-<span class="sourceLineNo">286</span>                t[i].setDaemon(true); // Otherwise we cannot exit<a name="line.286"></a>
-<span class="sourceLineNo">287</span>                t[i].start();<a name="line.287"></a>
-<span class="sourceLineNo">288</span>            }<a name="line.288"></a>
-<span class="sourceLineNo">289</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.289"></a>
-<span class="sourceLineNo">290</span>                t[i].join(WAIT_FOR_THREAD_COMPLETION);<a name="line.290"></a>
-<span class="sourceLineNo">291</span>                if (t[i].isAlive()) {<a name="line.291"></a>
-<span class="sourceLineNo">292</span>                    break; // at least one thread is stuck<a name="line.292"></a>
-<span class="sourceLineNo">293</span>                }<a name="line.293"></a>
-<span class="sourceLineNo">294</span>            }<a name="line.294"></a>
-<span class="sourceLineNo">295</span>            int active=0;<a name="line.295"></a>
+<span class="sourceLineNo">254</span>            } else {<a name="line.254"></a>
+<span class="sourceLineNo">255</span>                // create garbage:<a name="line.255"></a>
+<span class="sourceLineNo">256</span>                byte[] b =  new byte[bytz];<a name="line.256"></a>
+<span class="sourceLineNo">257</span>                bytz = bytz * 2;<a name="line.257"></a>
+<span class="sourceLineNo">258</span>            }<a name="line.258"></a>
+<span class="sourceLineNo">259</span>        }<a name="line.259"></a>
+<span class="sourceLineNo">260</span><a name="line.260"></a>
+<span class="sourceLineNo">261</span>        // some JVMs seem to take a little time to put references on<a name="line.261"></a>
+<span class="sourceLineNo">262</span>        // the reference queue once the reference has been collected<a name="line.262"></a>
+<span class="sourceLineNo">263</span>        // need to think about whether this is enough to justify<a name="line.263"></a>
+<span class="sourceLineNo">264</span>        // stepping through the collection each time...<a name="line.264"></a>
+<span class="sourceLineNo">265</span>        while(testQueue.poll() == null) {}<a name="line.265"></a>
+<span class="sourceLineNo">266</span><a name="line.266"></a>
+<span class="sourceLineNo">267</span>        // Test that the released objects are not taking space in the table<a name="line.267"></a>
+<span class="sourceLineNo">268</span>        assertEquals("underlying table not emptied", 0, weakHashtable.size());<a name="line.268"></a>
+<span class="sourceLineNo">269</span>    }<a name="line.269"></a>
+<span class="sourceLineNo">270</span><a name="line.270"></a>
+<span class="sourceLineNo">271</span>    public static class StupidThread extends Thread {<a name="line.271"></a>
+<span class="sourceLineNo">272</span><a name="line.272"></a>
+<span class="sourceLineNo">273</span>        public StupidThread(String name) {<a name="line.273"></a>
+<span class="sourceLineNo">274</span>            super(name);<a name="line.274"></a>
+<span class="sourceLineNo">275</span>        }<a name="line.275"></a>
+<span class="sourceLineNo">276</span><a name="line.276"></a>
+<span class="sourceLineNo">277</span>        public void run() {<a name="line.277"></a>
+<span class="sourceLineNo">278</span>            for (int i = 0; i &lt; RUN_LOOPS; i++) {<a name="line.278"></a>
+<span class="sourceLineNo">279</span>                hashtable.put("key" + ":" + i%10, Boolean.TRUE);<a name="line.279"></a>
+<span class="sourceLineNo">280</span>                if(i%50 == 0) {<a name="line.280"></a>
+<span class="sourceLineNo">281</span>                    yield();<a name="line.281"></a>
+<span class="sourceLineNo">282</span>                }<a name="line.282"></a>
+<span class="sourceLineNo">283</span>            }<a name="line.283"></a>
+<span class="sourceLineNo">284</span>        }<a name="line.284"></a>
+<span class="sourceLineNo">285</span>    }<a name="line.285"></a>
+<span class="sourceLineNo">286</span><a name="line.286"></a>
+<span class="sourceLineNo">287</span>    public void testLOGGING_119() throws Exception {<a name="line.287"></a>
+<span class="sourceLineNo">288</span>        Thread [] t = new Thread[THREAD_COUNT];<a name="line.288"></a>
+<span class="sourceLineNo">289</span>        for (int j=1; j &lt;= OUTER_LOOP; j++) {<a name="line.289"></a>
+<span class="sourceLineNo">290</span>            hashtable = new WeakHashtable();<a name="line.290"></a>
+<span class="sourceLineNo">291</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.291"></a>
+<span class="sourceLineNo">292</span>                t[i] = new StupidThread("Thread:" + i);<a name="line.292"></a>
+<span class="sourceLineNo">293</span>                t[i].setDaemon(true); // Otherwise we cannot exit<a name="line.293"></a>
+<span class="sourceLineNo">294</span>                t[i].start();<a name="line.294"></a>
+<span class="sourceLineNo">295</span>            }<a name="line.295"></a>
 <span class="sourceLineNo">296</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.296"></a>
-<span class="sourceLineNo">297</span>                if (t[i].isAlive()) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>                    active++;<a name="line.298"></a>
-<span class="sourceLineNo">299</span>                }<a name="line.299"></a>
-<span class="sourceLineNo">300</span>            }<a name="line.300"></a>
-<span class="sourceLineNo">301</span>            if (active &gt; 0) {<a name="line.301"></a>
-<span class="sourceLineNo">302</span>                fail("Attempt: " + j + " Stuck threads: " + active);<a name="line.302"></a>
-<span class="sourceLineNo">303</span>            }<a name="line.303"></a>
-<span class="sourceLineNo">304</span>        }<a name="line.304"></a>
-<span class="sourceLineNo">305</span>    }<a name="line.305"></a>
-<span class="sourceLineNo">306</span>}<a name="line.306"></a>
+<span class="sourceLineNo">297</span>                t[i].join(WAIT_FOR_THREAD_COMPLETION);<a name="line.297"></a>
+<span class="sourceLineNo">298</span>                if (t[i].isAlive()) {<a name="line.298"></a>
+<span class="sourceLineNo">299</span>                    break; // at least one thread is stuck<a name="line.299"></a>
+<span class="sourceLineNo">300</span>                }<a name="line.300"></a>
+<span class="sourceLineNo">301</span>            }<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            int active=0;<a name="line.302"></a>
+<span class="sourceLineNo">303</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.303"></a>
+<span class="sourceLineNo">304</span>                if (t[i].isAlive()) {<a name="line.304"></a>
+<span class="sourceLineNo">305</span>                    active++;<a name="line.305"></a>
+<span class="sourceLineNo">306</span>                }<a name="line.306"></a>
+<span class="sourceLineNo">307</span>            }<a name="line.307"></a>
+<span class="sourceLineNo">308</span>            if (active &gt; 0) {<a name="line.308"></a>
+<span class="sourceLineNo">309</span>                fail("Attempt: " + j + " Stuck threads: " + active);<a name="line.309"></a>
+<span class="sourceLineNo">310</span>            }<a name="line.310"></a>
+<span class="sourceLineNo">311</span>        }<a name="line.311"></a>
+<span class="sourceLineNo">312</span>    }<a name="line.312"></a>
+<span class="sourceLineNo">313</span>}<a name="line.313"></a>
 
 
 

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/impl/WeakHashtableTestCase.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/impl/WeakHashtableTestCase.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/impl/WeakHashtableTestCase.html Tue Mar 19 21:07:31 2013
@@ -228,90 +228,97 @@
 <span class="sourceLineNo">220</span>        assertTrue(values.contains(valueThree));<a name="line.220"></a>
 <span class="sourceLineNo">221</span>    }<a name="line.221"></a>
 <span class="sourceLineNo">222</span><a name="line.222"></a>
-<span class="sourceLineNo">223</span>    public void testRelease() throws Exception {<a name="line.223"></a>
-<span class="sourceLineNo">224</span>        assertNotNull(weakHashtable.get(new Long(1)));<a name="line.224"></a>
-<span class="sourceLineNo">225</span>        ReferenceQueue testQueue = new ReferenceQueue();<a name="line.225"></a>
-<span class="sourceLineNo">226</span>        WeakReference weakKeyOne = new WeakReference(keyOne, testQueue);<a name="line.226"></a>
-<span class="sourceLineNo">227</span><a name="line.227"></a>
-<span class="sourceLineNo">228</span>        // lose our references<a name="line.228"></a>
-<span class="sourceLineNo">229</span>        keyOne = null;<a name="line.229"></a>
-<span class="sourceLineNo">230</span>        keyTwo = null;<a name="line.230"></a>
-<span class="sourceLineNo">231</span>        keyThree = null;<a name="line.231"></a>
-<span class="sourceLineNo">232</span>        valueOne = null;<a name="line.232"></a>
-<span class="sourceLineNo">233</span>        valueTwo = null;<a name="line.233"></a>
-<span class="sourceLineNo">234</span>        valueThree = null;<a name="line.234"></a>
-<span class="sourceLineNo">235</span><a name="line.235"></a>
-<span class="sourceLineNo">236</span>        int iterations = 0;<a name="line.236"></a>
-<span class="sourceLineNo">237</span>        int bytz = 2;<a name="line.237"></a>
-<span class="sourceLineNo">238</span>        while(true) {<a name="line.238"></a>
-<span class="sourceLineNo">239</span>            System.gc();<a name="line.239"></a>
-<span class="sourceLineNo">240</span>            if(iterations++ &gt; MAX_GC_ITERATIONS){<a name="line.240"></a>
-<span class="sourceLineNo">241</span>                fail("Max iterations reached before resource released.");<a name="line.241"></a>
-<span class="sourceLineNo">242</span>            }<a name="line.242"></a>
-<span class="sourceLineNo">243</span><a name="line.243"></a>
-<span class="sourceLineNo">244</span>            if(weakHashtable.get(new Long(1)) == null) {<a name="line.244"></a>
-<span class="sourceLineNo">245</span>                break;<a name="line.245"></a>
-<span class="sourceLineNo">246</span><a name="line.246"></a>
-<span class="sourceLineNo">247</span>            } else {<a name="line.247"></a>
-<span class="sourceLineNo">248</span>                // create garbage:<a name="line.248"></a>
-<span class="sourceLineNo">249</span>                byte[] b =  new byte[bytz];<a name="line.249"></a>
-<span class="sourceLineNo">250</span>                bytz = bytz * 2;<a name="line.250"></a>
-<span class="sourceLineNo">251</span>            }<a name="line.251"></a>
-<span class="sourceLineNo">252</span>        }<a name="line.252"></a>
+<span class="sourceLineNo">223</span>    /**<a name="line.223"></a>
+<span class="sourceLineNo">224</span>     * Disabled this test as it makes wrong assumptions wrt the GC.<a name="line.224"></a>
+<span class="sourceLineNo">225</span>     * This test especially fails with:<a name="line.225"></a>
+<span class="sourceLineNo">226</span>     *<a name="line.226"></a>
+<span class="sourceLineNo">227</span>     * Java(TM) SE Runtime Environment (build pxi3260sr12-20121025_01(SR12))<a name="line.227"></a>
+<span class="sourceLineNo">228</span>     * IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr12-20121024_1<a name="line.228"></a>
+<span class="sourceLineNo">229</span>     */<a name="line.229"></a>
+<span class="sourceLineNo">230</span>    public void xxxIgnoretestRelease() throws Exception {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        assertNotNull(weakHashtable.get(new Long(1)));<a name="line.231"></a>
+<span class="sourceLineNo">232</span>        ReferenceQueue testQueue = new ReferenceQueue();<a name="line.232"></a>
+<span class="sourceLineNo">233</span>        WeakReference weakKeyOne = new WeakReference(keyOne, testQueue);<a name="line.233"></a>
+<span class="sourceLineNo">234</span><a name="line.234"></a>
+<span class="sourceLineNo">235</span>        // lose our references<a name="line.235"></a>
+<span class="sourceLineNo">236</span>        keyOne = null;<a name="line.236"></a>
+<span class="sourceLineNo">237</span>        keyTwo = null;<a name="line.237"></a>
+<span class="sourceLineNo">238</span>        keyThree = null;<a name="line.238"></a>
+<span class="sourceLineNo">239</span>        valueOne = null;<a name="line.239"></a>
+<span class="sourceLineNo">240</span>        valueTwo = null;<a name="line.240"></a>
+<span class="sourceLineNo">241</span>        valueThree = null;<a name="line.241"></a>
+<span class="sourceLineNo">242</span><a name="line.242"></a>
+<span class="sourceLineNo">243</span>        int iterations = 0;<a name="line.243"></a>
+<span class="sourceLineNo">244</span>        int bytz = 2;<a name="line.244"></a>
+<span class="sourceLineNo">245</span>        while(true) {<a name="line.245"></a>
+<span class="sourceLineNo">246</span>            System.gc();<a name="line.246"></a>
+<span class="sourceLineNo">247</span>            if(iterations++ &gt; MAX_GC_ITERATIONS){<a name="line.247"></a>
+<span class="sourceLineNo">248</span>                fail("Max iterations reached before resource released.");<a name="line.248"></a>
+<span class="sourceLineNo">249</span>            }<a name="line.249"></a>
+<span class="sourceLineNo">250</span><a name="line.250"></a>
+<span class="sourceLineNo">251</span>            if(weakHashtable.get(new Long(1)) == null) {<a name="line.251"></a>
+<span class="sourceLineNo">252</span>                break;<a name="line.252"></a>
 <span class="sourceLineNo">253</span><a name="line.253"></a>
-<span class="sourceLineNo">254</span>        // some JVMs seem to take a little time to put references on<a name="line.254"></a>
-<span class="sourceLineNo">255</span>        // the reference queue once the reference has been collected<a name="line.255"></a>
-<span class="sourceLineNo">256</span>        // need to think about whether this is enough to justify<a name="line.256"></a>
-<span class="sourceLineNo">257</span>        // stepping through the collection each time...<a name="line.257"></a>
-<span class="sourceLineNo">258</span>        while(testQueue.poll() == null) {}<a name="line.258"></a>
-<span class="sourceLineNo">259</span><a name="line.259"></a>
-<span class="sourceLineNo">260</span>        // Test that the released objects are not taking space in the table<a name="line.260"></a>
-<span class="sourceLineNo">261</span>        assertEquals("underlying table not emptied", 0, weakHashtable.size());<a name="line.261"></a>
-<span class="sourceLineNo">262</span>    }<a name="line.262"></a>
-<span class="sourceLineNo">263</span><a name="line.263"></a>
-<span class="sourceLineNo">264</span>    public static class StupidThread extends Thread {<a name="line.264"></a>
-<span class="sourceLineNo">265</span><a name="line.265"></a>
-<span class="sourceLineNo">266</span>        public StupidThread(String name) {<a name="line.266"></a>
-<span class="sourceLineNo">267</span>            super(name);<a name="line.267"></a>
-<span class="sourceLineNo">268</span>        }<a name="line.268"></a>
-<span class="sourceLineNo">269</span><a name="line.269"></a>
-<span class="sourceLineNo">270</span>        public void run() {<a name="line.270"></a>
-<span class="sourceLineNo">271</span>            for (int i = 0; i &lt; RUN_LOOPS; i++) {<a name="line.271"></a>
-<span class="sourceLineNo">272</span>                hashtable.put("key" + ":" + i%10, Boolean.TRUE);<a name="line.272"></a>
-<span class="sourceLineNo">273</span>                if(i%50 == 0) {<a name="line.273"></a>
-<span class="sourceLineNo">274</span>                    yield();<a name="line.274"></a>
-<span class="sourceLineNo">275</span>                }<a name="line.275"></a>
-<span class="sourceLineNo">276</span>            }<a name="line.276"></a>
-<span class="sourceLineNo">277</span>        }<a name="line.277"></a>
-<span class="sourceLineNo">278</span>    }<a name="line.278"></a>
-<span class="sourceLineNo">279</span><a name="line.279"></a>
-<span class="sourceLineNo">280</span>    public void testLOGGING_119() throws Exception {<a name="line.280"></a>
-<span class="sourceLineNo">281</span>        Thread [] t = new Thread[THREAD_COUNT];<a name="line.281"></a>
-<span class="sourceLineNo">282</span>        for (int j=1; j &lt;= OUTER_LOOP; j++) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>            hashtable = new WeakHashtable();<a name="line.283"></a>
-<span class="sourceLineNo">284</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.284"></a>
-<span class="sourceLineNo">285</span>                t[i] = new StupidThread("Thread:" + i);<a name="line.285"></a>
-<span class="sourceLineNo">286</span>                t[i].setDaemon(true); // Otherwise we cannot exit<a name="line.286"></a>
-<span class="sourceLineNo">287</span>                t[i].start();<a name="line.287"></a>
-<span class="sourceLineNo">288</span>            }<a name="line.288"></a>
-<span class="sourceLineNo">289</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.289"></a>
-<span class="sourceLineNo">290</span>                t[i].join(WAIT_FOR_THREAD_COMPLETION);<a name="line.290"></a>
-<span class="sourceLineNo">291</span>                if (t[i].isAlive()) {<a name="line.291"></a>
-<span class="sourceLineNo">292</span>                    break; // at least one thread is stuck<a name="line.292"></a>
-<span class="sourceLineNo">293</span>                }<a name="line.293"></a>
-<span class="sourceLineNo">294</span>            }<a name="line.294"></a>
-<span class="sourceLineNo">295</span>            int active=0;<a name="line.295"></a>
+<span class="sourceLineNo">254</span>            } else {<a name="line.254"></a>
+<span class="sourceLineNo">255</span>                // create garbage:<a name="line.255"></a>
+<span class="sourceLineNo">256</span>                byte[] b =  new byte[bytz];<a name="line.256"></a>
+<span class="sourceLineNo">257</span>                bytz = bytz * 2;<a name="line.257"></a>
+<span class="sourceLineNo">258</span>            }<a name="line.258"></a>
+<span class="sourceLineNo">259</span>        }<a name="line.259"></a>
+<span class="sourceLineNo">260</span><a name="line.260"></a>
+<span class="sourceLineNo">261</span>        // some JVMs seem to take a little time to put references on<a name="line.261"></a>
+<span class="sourceLineNo">262</span>        // the reference queue once the reference has been collected<a name="line.262"></a>
+<span class="sourceLineNo">263</span>        // need to think about whether this is enough to justify<a name="line.263"></a>
+<span class="sourceLineNo">264</span>        // stepping through the collection each time...<a name="line.264"></a>
+<span class="sourceLineNo">265</span>        while(testQueue.poll() == null) {}<a name="line.265"></a>
+<span class="sourceLineNo">266</span><a name="line.266"></a>
+<span class="sourceLineNo">267</span>        // Test that the released objects are not taking space in the table<a name="line.267"></a>
+<span class="sourceLineNo">268</span>        assertEquals("underlying table not emptied", 0, weakHashtable.size());<a name="line.268"></a>
+<span class="sourceLineNo">269</span>    }<a name="line.269"></a>
+<span class="sourceLineNo">270</span><a name="line.270"></a>
+<span class="sourceLineNo">271</span>    public static class StupidThread extends Thread {<a name="line.271"></a>
+<span class="sourceLineNo">272</span><a name="line.272"></a>
+<span class="sourceLineNo">273</span>        public StupidThread(String name) {<a name="line.273"></a>
+<span class="sourceLineNo">274</span>            super(name);<a name="line.274"></a>
+<span class="sourceLineNo">275</span>        }<a name="line.275"></a>
+<span class="sourceLineNo">276</span><a name="line.276"></a>
+<span class="sourceLineNo">277</span>        public void run() {<a name="line.277"></a>
+<span class="sourceLineNo">278</span>            for (int i = 0; i &lt; RUN_LOOPS; i++) {<a name="line.278"></a>
+<span class="sourceLineNo">279</span>                hashtable.put("key" + ":" + i%10, Boolean.TRUE);<a name="line.279"></a>
+<span class="sourceLineNo">280</span>                if(i%50 == 0) {<a name="line.280"></a>
+<span class="sourceLineNo">281</span>                    yield();<a name="line.281"></a>
+<span class="sourceLineNo">282</span>                }<a name="line.282"></a>
+<span class="sourceLineNo">283</span>            }<a name="line.283"></a>
+<span class="sourceLineNo">284</span>        }<a name="line.284"></a>
+<span class="sourceLineNo">285</span>    }<a name="line.285"></a>
+<span class="sourceLineNo">286</span><a name="line.286"></a>
+<span class="sourceLineNo">287</span>    public void testLOGGING_119() throws Exception {<a name="line.287"></a>
+<span class="sourceLineNo">288</span>        Thread [] t = new Thread[THREAD_COUNT];<a name="line.288"></a>
+<span class="sourceLineNo">289</span>        for (int j=1; j &lt;= OUTER_LOOP; j++) {<a name="line.289"></a>
+<span class="sourceLineNo">290</span>            hashtable = new WeakHashtable();<a name="line.290"></a>
+<span class="sourceLineNo">291</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.291"></a>
+<span class="sourceLineNo">292</span>                t[i] = new StupidThread("Thread:" + i);<a name="line.292"></a>
+<span class="sourceLineNo">293</span>                t[i].setDaemon(true); // Otherwise we cannot exit<a name="line.293"></a>
+<span class="sourceLineNo">294</span>                t[i].start();<a name="line.294"></a>
+<span class="sourceLineNo">295</span>            }<a name="line.295"></a>
 <span class="sourceLineNo">296</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.296"></a>
-<span class="sourceLineNo">297</span>                if (t[i].isAlive()) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>                    active++;<a name="line.298"></a>
-<span class="sourceLineNo">299</span>                }<a name="line.299"></a>
-<span class="sourceLineNo">300</span>            }<a name="line.300"></a>
-<span class="sourceLineNo">301</span>            if (active &gt; 0) {<a name="line.301"></a>
-<span class="sourceLineNo">302</span>                fail("Attempt: " + j + " Stuck threads: " + active);<a name="line.302"></a>
-<span class="sourceLineNo">303</span>            }<a name="line.303"></a>
-<span class="sourceLineNo">304</span>        }<a name="line.304"></a>
-<span class="sourceLineNo">305</span>    }<a name="line.305"></a>
-<span class="sourceLineNo">306</span>}<a name="line.306"></a>
+<span class="sourceLineNo">297</span>                t[i].join(WAIT_FOR_THREAD_COMPLETION);<a name="line.297"></a>
+<span class="sourceLineNo">298</span>                if (t[i].isAlive()) {<a name="line.298"></a>
+<span class="sourceLineNo">299</span>                    break; // at least one thread is stuck<a name="line.299"></a>
+<span class="sourceLineNo">300</span>                }<a name="line.300"></a>
+<span class="sourceLineNo">301</span>            }<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            int active=0;<a name="line.302"></a>
+<span class="sourceLineNo">303</span>            for (int i = 0; i &lt; t.length; i++) {<a name="line.303"></a>
+<span class="sourceLineNo">304</span>                if (t[i].isAlive()) {<a name="line.304"></a>
+<span class="sourceLineNo">305</span>                    active++;<a name="line.305"></a>
+<span class="sourceLineNo">306</span>                }<a name="line.306"></a>
+<span class="sourceLineNo">307</span>            }<a name="line.307"></a>
+<span class="sourceLineNo">308</span>            if (active &gt; 0) {<a name="line.308"></a>
+<span class="sourceLineNo">309</span>                fail("Attempt: " + j + " Stuck threads: " + active);<a name="line.309"></a>
+<span class="sourceLineNo">310</span>            }<a name="line.310"></a>
+<span class="sourceLineNo">311</span>        }<a name="line.311"></a>
+<span class="sourceLineNo">312</span>    }<a name="line.312"></a>
+<span class="sourceLineNo">313</span>}<a name="line.313"></a>
 
 
 

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/MockSecurityManager.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/MockSecurityManager.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/MockSecurityManager.html Tue Mar 19 21:07:31 2013
@@ -39,7 +39,7 @@
 <span class="sourceLineNo">031</span>    private final Permissions permissions = new Permissions();<a name="line.31"></a>
 <span class="sourceLineNo">032</span>    private static final Permission setSecurityManagerPerm =<a name="line.32"></a>
 <span class="sourceLineNo">033</span>        new RuntimePermission("setSecurityManager");<a name="line.33"></a>
-<span class="sourceLineNo">034</span>    <a name="line.34"></a>
+<span class="sourceLineNo">034</span><a name="line.34"></a>
 <span class="sourceLineNo">035</span>    private int untrustedCodeCount = 0;<a name="line.35"></a>
 <span class="sourceLineNo">036</span><a name="line.36"></a>
 <span class="sourceLineNo">037</span>    public MockSecurityManager() {<a name="line.37"></a>
@@ -60,7 +60,7 @@
 <span class="sourceLineNo">052</span>     * value indicates a bug in JCL, ie a situation where code was not<a name="line.52"></a>
 <span class="sourceLineNo">053</span>     * correctly wrapped in an AccessController block. The result of such a<a name="line.53"></a>
 <span class="sourceLineNo">054</span>     * bug is that signing JCL is not sufficient to allow JCL to perform<a name="line.54"></a>
-<span class="sourceLineNo">055</span>     * the operation; the caller would need to be signed too. <a name="line.55"></a>
+<span class="sourceLineNo">055</span>     * the operation; the caller would need to be signed too.<a name="line.55"></a>
 <span class="sourceLineNo">056</span>     */<a name="line.56"></a>
 <span class="sourceLineNo">057</span>    public int getUntrustedCodeCount() {<a name="line.57"></a>
 <span class="sourceLineNo">058</span>        return untrustedCodeCount;<a name="line.58"></a>
@@ -89,59 +89,65 @@
 <span class="sourceLineNo">081</span>        Exception e = new Exception();<a name="line.81"></a>
 <span class="sourceLineNo">082</span>        e.fillInStackTrace();<a name="line.82"></a>
 <span class="sourceLineNo">083</span>        StackTraceElement[] stack = e.getStackTrace();<a name="line.83"></a>
-<span class="sourceLineNo">084</span>        <a name="line.84"></a>
+<span class="sourceLineNo">084</span><a name="line.84"></a>
 <span class="sourceLineNo">085</span>        // scan the call stack from most recent to oldest.<a name="line.85"></a>
 <span class="sourceLineNo">086</span>        // start at 1 to skip the entry in the stack for this method<a name="line.86"></a>
 <span class="sourceLineNo">087</span>        for(int i=1; i&lt;stack.length; ++i) {<a name="line.87"></a>
 <span class="sourceLineNo">088</span>            String cname = stack[i].getClassName();<a name="line.88"></a>
-<span class="sourceLineNo">089</span>            System.out.println("" + i + ":" + stack[i].getClassName() + <a name="line.89"></a>
-<span class="sourceLineNo">090</span>              "." + stack[i].getMethodName());<a name="line.90"></a>
+<span class="sourceLineNo">089</span>            System.out.println("" + i + ":" + stack[i].getClassName() +<a name="line.89"></a>
+<span class="sourceLineNo">090</span>              "." + stack[i].getMethodName() + ":" + stack[i].getLineNumber());<a name="line.90"></a>
 <span class="sourceLineNo">091</span><a name="line.91"></a>
-<span class="sourceLineNo">092</span>            if (cname.equals("java.security.AccessController")) {<a name="line.92"></a>
-<span class="sourceLineNo">093</span>                // Presumably method name equals "doPrivileged"<a name="line.93"></a>
-<span class="sourceLineNo">094</span>                //<a name="line.94"></a>
-<span class="sourceLineNo">095</span>                // The previous iteration of this loop verified that the<a name="line.95"></a>
-<span class="sourceLineNo">096</span>                // PrivilegedAction.run method associated with this<a name="line.96"></a>
-<span class="sourceLineNo">097</span>                // doPrivileged method call had the right permissions,<a name="line.97"></a>
-<span class="sourceLineNo">098</span>                // so we just return here. Effectively, the method invoking<a name="line.98"></a>
-<span class="sourceLineNo">099</span>                // doPrivileged asserted that it checked the input params<a name="line.99"></a>
-<span class="sourceLineNo">100</span>                // and found them safe, and that code is trusted, so we<a name="line.100"></a>
-<span class="sourceLineNo">101</span>                // don't need to check the trust level of code higher in<a name="line.101"></a>
-<span class="sourceLineNo">102</span>                // the call stack.<a name="line.102"></a>
-<span class="sourceLineNo">103</span>                System.out.println("Access controller found: returning");<a name="line.103"></a>
-<span class="sourceLineNo">104</span>                return;<a name="line.104"></a>
-<span class="sourceLineNo">105</span>            } else if (cname.startsWith("java.") <a name="line.105"></a>
-<span class="sourceLineNo">106</span>                || cname.startsWith("javax.") <a name="line.106"></a>
-<span class="sourceLineNo">107</span>                || cname.startsWith("junit.") <a name="line.107"></a>
-<span class="sourceLineNo">108</span>                || cname.startsWith("org.apache.tools.ant.")<a name="line.108"></a>
-<span class="sourceLineNo">109</span>                || cname.startsWith("sun.")) {<a name="line.109"></a>
-<span class="sourceLineNo">110</span>                // Code in these packages is trusted if the caller is trusted.<a name="line.110"></a>
-<span class="sourceLineNo">111</span>                //<a name="line.111"></a>
-<span class="sourceLineNo">112</span>                // TODO: maybe check class is loaded via system loader or similar rather<a name="line.112"></a>
-<span class="sourceLineNo">113</span>                // than checking name? Trusted domains may be different in alternative<a name="line.113"></a>
-<span class="sourceLineNo">114</span>                // jvms..<a name="line.114"></a>
-<span class="sourceLineNo">115</span>            } else if (cname.startsWith("org.apache.commons.logging.security")) {<a name="line.115"></a>
-<span class="sourceLineNo">116</span>                // this is the unit test code; treat this like an untrusted client<a name="line.116"></a>
-<span class="sourceLineNo">117</span>                // app that is using JCL<a name="line.117"></a>
-<span class="sourceLineNo">118</span>                ++untrustedCodeCount;<a name="line.118"></a>
-<span class="sourceLineNo">119</span>                System.out.println("Untrusted code [testcase] found");<a name="line.119"></a>
-<span class="sourceLineNo">120</span>                throw new SecurityException("Untrusted code [testcase] found");<a name="line.120"></a>
-<span class="sourceLineNo">121</span>            } else if (cname.startsWith("org.apache.commons.logging.")) {<a name="line.121"></a>
-<span class="sourceLineNo">122</span>                if (permissions.implies(p)) {<a name="line.122"></a>
-<span class="sourceLineNo">123</span>                    // Code here is trusted if the caller is trusted<a name="line.123"></a>
-<span class="sourceLineNo">124</span>                    System.out.println("Permission in allowed set for JCL class");<a name="line.124"></a>
-<span class="sourceLineNo">125</span>                } else {<a name="line.125"></a>
-<span class="sourceLineNo">126</span>                    System.out.println("Permission refused:" + p.getClass() + ":" + p);<a name="line.126"></a>
-<span class="sourceLineNo">127</span>                    throw new SecurityException("Permission refused:" + p.getClass() + ":" + p);<a name="line.127"></a>
-<span class="sourceLineNo">128</span>                }<a name="line.128"></a>
-<span class="sourceLineNo">129</span>            } else {<a name="line.129"></a>
-<span class="sourceLineNo">130</span>                // we found some code that is not trusted to perform this operation.<a name="line.130"></a>
-<span class="sourceLineNo">131</span>                System.out.println("Unexpected code: permission refused:" + p.getClass() + ":" + p);<a name="line.131"></a>
-<span class="sourceLineNo">132</span>                throw new SecurityException("Unexpected code: permission refused:" + p.getClass() + ":" + p);<a name="line.132"></a>
-<span class="sourceLineNo">133</span>            }<a name="line.133"></a>
-<span class="sourceLineNo">134</span>        }<a name="line.134"></a>
-<span class="sourceLineNo">135</span>    }<a name="line.135"></a>
-<span class="sourceLineNo">136</span>}<a name="line.136"></a>
+<span class="sourceLineNo">092</span>            if (cname.equals("java.util.logging.Handler") &amp;&amp; stack[i].getMethodName().equals("setLevel")) {<a name="line.92"></a>
+<span class="sourceLineNo">093</span>                // LOGGING CODE CAUSES ACCESSCONTROLEXCEPTION<a name="line.93"></a>
+<span class="sourceLineNo">094</span>                // http://www-01.ibm.com/support/docview.wss?uid=swg1IZ51152<a name="line.94"></a>
+<span class="sourceLineNo">095</span>                return;<a name="line.95"></a>
+<span class="sourceLineNo">096</span>            }<a name="line.96"></a>
+<span class="sourceLineNo">097</span><a name="line.97"></a>
+<span class="sourceLineNo">098</span>            if (cname.equals("java.security.AccessController")) {<a name="line.98"></a>
+<span class="sourceLineNo">099</span>                // Presumably method name equals "doPrivileged"<a name="line.99"></a>
+<span class="sourceLineNo">100</span>                //<a name="line.100"></a>
+<span class="sourceLineNo">101</span>                // The previous iteration of this loop verified that the<a name="line.101"></a>
+<span class="sourceLineNo">102</span>                // PrivilegedAction.run method associated with this<a name="line.102"></a>
+<span class="sourceLineNo">103</span>                // doPrivileged method call had the right permissions,<a name="line.103"></a>
+<span class="sourceLineNo">104</span>                // so we just return here. Effectively, the method invoking<a name="line.104"></a>
+<span class="sourceLineNo">105</span>                // doPrivileged asserted that it checked the input params<a name="line.105"></a>
+<span class="sourceLineNo">106</span>                // and found them safe, and that code is trusted, so we<a name="line.106"></a>
+<span class="sourceLineNo">107</span>                // don't need to check the trust level of code higher in<a name="line.107"></a>
+<span class="sourceLineNo">108</span>                // the call stack.<a name="line.108"></a>
+<span class="sourceLineNo">109</span>                System.out.println("Access controller found: returning");<a name="line.109"></a>
+<span class="sourceLineNo">110</span>                return;<a name="line.110"></a>
+<span class="sourceLineNo">111</span>            } else if (cname.startsWith("java.")<a name="line.111"></a>
+<span class="sourceLineNo">112</span>                || cname.startsWith("javax.")<a name="line.112"></a>
+<span class="sourceLineNo">113</span>                || cname.startsWith("junit.")<a name="line.113"></a>
+<span class="sourceLineNo">114</span>                || cname.startsWith("org.apache.tools.ant.")<a name="line.114"></a>
+<span class="sourceLineNo">115</span>                || cname.startsWith("sun.")) {<a name="line.115"></a>
+<span class="sourceLineNo">116</span>                // Code in these packages is trusted if the caller is trusted.<a name="line.116"></a>
+<span class="sourceLineNo">117</span>                //<a name="line.117"></a>
+<span class="sourceLineNo">118</span>                // TODO: maybe check class is loaded via system loader or similar rather<a name="line.118"></a>
+<span class="sourceLineNo">119</span>                // than checking name? Trusted domains may be different in alternative<a name="line.119"></a>
+<span class="sourceLineNo">120</span>                // jvms..<a name="line.120"></a>
+<span class="sourceLineNo">121</span>            } else if (cname.startsWith("org.apache.commons.logging.security")) {<a name="line.121"></a>
+<span class="sourceLineNo">122</span>                // this is the unit test code; treat this like an untrusted client<a name="line.122"></a>
+<span class="sourceLineNo">123</span>                // app that is using JCL<a name="line.123"></a>
+<span class="sourceLineNo">124</span>                ++untrustedCodeCount;<a name="line.124"></a>
+<span class="sourceLineNo">125</span>                System.out.println("Untrusted code [testcase] found");<a name="line.125"></a>
+<span class="sourceLineNo">126</span>                throw new SecurityException("Untrusted code [testcase] found");<a name="line.126"></a>
+<span class="sourceLineNo">127</span>            } else if (cname.startsWith("org.apache.commons.logging.")) {<a name="line.127"></a>
+<span class="sourceLineNo">128</span>                if (permissions.implies(p)) {<a name="line.128"></a>
+<span class="sourceLineNo">129</span>                    // Code here is trusted if the caller is trusted<a name="line.129"></a>
+<span class="sourceLineNo">130</span>                    System.out.println("Permission in allowed set for JCL class");<a name="line.130"></a>
+<span class="sourceLineNo">131</span>                } else {<a name="line.131"></a>
+<span class="sourceLineNo">132</span>                    System.out.println("Permission refused:" + p.getClass() + ":" + p);<a name="line.132"></a>
+<span class="sourceLineNo">133</span>                    throw new SecurityException("Permission refused:" + p.getClass() + ":" + p);<a name="line.133"></a>
+<span class="sourceLineNo">134</span>                }<a name="line.134"></a>
+<span class="sourceLineNo">135</span>            } else {<a name="line.135"></a>
+<span class="sourceLineNo">136</span>                // we found some code that is not trusted to perform this operation.<a name="line.136"></a>
+<span class="sourceLineNo">137</span>                System.out.println("Unexpected code: permission refused:" + p.getClass() + ":" + p);<a name="line.137"></a>
+<span class="sourceLineNo">138</span>                throw new SecurityException("Unexpected code: permission refused:" + p.getClass() + ":" + p);<a name="line.138"></a>
+<span class="sourceLineNo">139</span>            }<a name="line.139"></a>
+<span class="sourceLineNo">140</span>        }<a name="line.140"></a>
+<span class="sourceLineNo">141</span>    }<a name="line.141"></a>
+<span class="sourceLineNo">142</span>}<a name="line.142"></a>
 
 
 

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityAllowedTestCase.CustomHashtable.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityAllowedTestCase.CustomHashtable.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityAllowedTestCase.CustomHashtable.html Tue Mar 19 21:07:31 2013
@@ -81,7 +81,7 @@
 <span class="sourceLineNo">073</span>        // save security manager so it can be restored in tearDown<a name="line.73"></a>
 <span class="sourceLineNo">074</span>        oldSecMgr = System.getSecurityManager();<a name="line.74"></a>
 <span class="sourceLineNo">075</span>    }<a name="line.75"></a>
-<span class="sourceLineNo">076</span>    <a name="line.76"></a>
+<span class="sourceLineNo">076</span><a name="line.76"></a>
 <span class="sourceLineNo">077</span>    public void tearDown() {<a name="line.77"></a>
 <span class="sourceLineNo">078</span>        // Restore, so other tests don't get stuffed up if a test<a name="line.78"></a>
 <span class="sourceLineNo">079</span>        // sets a custom security manager.<a name="line.79"></a>
@@ -118,32 +118,34 @@
 <span class="sourceLineNo">110</span>            // requires permission accessClassInPackage. JCL explicitly does not<a name="line.110"></a>
 <span class="sourceLineNo">111</span>            // wrap calls to log methods in AccessControllers because writes to<a name="line.111"></a>
 <span class="sourceLineNo">112</span>            // a log file *should* only be permitted if the original caller is<a name="line.112"></a>
-<span class="sourceLineNo">113</span>            // trusted to access that file. <a name="line.113"></a>
+<span class="sourceLineNo">113</span>            // trusted to access that file.<a name="line.113"></a>
 <span class="sourceLineNo">114</span>            int untrustedCodeCount = mySecurityManager.getUntrustedCodeCount();<a name="line.114"></a>
 <span class="sourceLineNo">115</span>            log.info("testing");<a name="line.115"></a>
-<span class="sourceLineNo">116</span>            <a name="line.116"></a>
+<span class="sourceLineNo">116</span><a name="line.116"></a>
 <span class="sourceLineNo">117</span>            // check that the default map implementation was loaded, as JCL was<a name="line.117"></a>
 <span class="sourceLineNo">118</span>            // forbidden from reading the HASHTABLE_IMPLEMENTATION_PROPERTY property.<a name="line.118"></a>
 <span class="sourceLineNo">119</span>            System.setSecurityManager(null);<a name="line.119"></a>
 <span class="sourceLineNo">120</span>            Field factoryField = c.getDeclaredField("factories");<a name="line.120"></a>
 <span class="sourceLineNo">121</span>            factoryField.setAccessible(true);<a name="line.121"></a>
-<span class="sourceLineNo">122</span>            Object factoryTable = factoryField.get(null); <a name="line.122"></a>
+<span class="sourceLineNo">122</span>            Object factoryTable = factoryField.get(null);<a name="line.122"></a>
 <span class="sourceLineNo">123</span>            assertNotNull(factoryTable);<a name="line.123"></a>
 <span class="sourceLineNo">124</span>            assertEquals(CustomHashtable.class.getName(), factoryTable.getClass().getName());<a name="line.124"></a>
-<span class="sourceLineNo">125</span>            <a name="line.125"></a>
-<span class="sourceLineNo">126</span>            assertEquals(0, untrustedCodeCount);<a name="line.126"></a>
-<span class="sourceLineNo">127</span>        } catch(Throwable t) {<a name="line.127"></a>
-<span class="sourceLineNo">128</span>            // Restore original security manager so output can be generated; the<a name="line.128"></a>
-<span class="sourceLineNo">129</span>            // PrintWriter constructor tries to read the line.separator<a name="line.129"></a>
-<span class="sourceLineNo">130</span>            // system property.<a name="line.130"></a>
-<span class="sourceLineNo">131</span>            System.setSecurityManager(oldSecMgr);<a name="line.131"></a>
-<span class="sourceLineNo">132</span>            StringWriter sw = new StringWriter();<a name="line.132"></a>
-<span class="sourceLineNo">133</span>            PrintWriter pw = new PrintWriter(sw);<a name="line.133"></a>
-<span class="sourceLineNo">134</span>            t.printStackTrace(pw);<a name="line.134"></a>
-<span class="sourceLineNo">135</span>            fail("Unexpected exception:" + t.getMessage() + ":" + sw.toString());<a name="line.135"></a>
-<span class="sourceLineNo">136</span>        }<a name="line.136"></a>
-<span class="sourceLineNo">137</span>    }<a name="line.137"></a>
-<span class="sourceLineNo">138</span>}<a name="line.138"></a>
+<span class="sourceLineNo">125</span><a name="line.125"></a>
+<span class="sourceLineNo">126</span>            // we better compare that we have no security exception during the call to log<a name="line.126"></a>
+<span class="sourceLineNo">127</span>            // IBM JVM tries to load bundles during the invoke call, which increase the count<a name="line.127"></a>
+<span class="sourceLineNo">128</span>            assertEquals(untrustedCodeCount, mySecurityManager.getUntrustedCodeCount());<a name="line.128"></a>
+<span class="sourceLineNo">129</span>        } catch(Throwable t) {<a name="line.129"></a>
+<span class="sourceLineNo">130</span>            // Restore original security manager so output can be generated; the<a name="line.130"></a>
+<span class="sourceLineNo">131</span>            // PrintWriter constructor tries to read the line.separator<a name="line.131"></a>
+<span class="sourceLineNo">132</span>            // system property.<a name="line.132"></a>
+<span class="sourceLineNo">133</span>            System.setSecurityManager(oldSecMgr);<a name="line.133"></a>
+<span class="sourceLineNo">134</span>            StringWriter sw = new StringWriter();<a name="line.134"></a>
+<span class="sourceLineNo">135</span>            PrintWriter pw = new PrintWriter(sw);<a name="line.135"></a>
+<span class="sourceLineNo">136</span>            t.printStackTrace(pw);<a name="line.136"></a>
+<span class="sourceLineNo">137</span>            fail("Unexpected exception:" + t.getMessage() + ":" + sw.toString());<a name="line.137"></a>
+<span class="sourceLineNo">138</span>        }<a name="line.138"></a>
+<span class="sourceLineNo">139</span>    }<a name="line.139"></a>
+<span class="sourceLineNo">140</span>}<a name="line.140"></a>
 
 
 

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityAllowedTestCase.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityAllowedTestCase.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityAllowedTestCase.html Tue Mar 19 21:07:31 2013
@@ -81,7 +81,7 @@
 <span class="sourceLineNo">073</span>        // save security manager so it can be restored in tearDown<a name="line.73"></a>
 <span class="sourceLineNo">074</span>        oldSecMgr = System.getSecurityManager();<a name="line.74"></a>
 <span class="sourceLineNo">075</span>    }<a name="line.75"></a>
-<span class="sourceLineNo">076</span>    <a name="line.76"></a>
+<span class="sourceLineNo">076</span><a name="line.76"></a>
 <span class="sourceLineNo">077</span>    public void tearDown() {<a name="line.77"></a>
 <span class="sourceLineNo">078</span>        // Restore, so other tests don't get stuffed up if a test<a name="line.78"></a>
 <span class="sourceLineNo">079</span>        // sets a custom security manager.<a name="line.79"></a>
@@ -118,32 +118,34 @@
 <span class="sourceLineNo">110</span>            // requires permission accessClassInPackage. JCL explicitly does not<a name="line.110"></a>
 <span class="sourceLineNo">111</span>            // wrap calls to log methods in AccessControllers because writes to<a name="line.111"></a>
 <span class="sourceLineNo">112</span>            // a log file *should* only be permitted if the original caller is<a name="line.112"></a>
-<span class="sourceLineNo">113</span>            // trusted to access that file. <a name="line.113"></a>
+<span class="sourceLineNo">113</span>            // trusted to access that file.<a name="line.113"></a>
 <span class="sourceLineNo">114</span>            int untrustedCodeCount = mySecurityManager.getUntrustedCodeCount();<a name="line.114"></a>
 <span class="sourceLineNo">115</span>            log.info("testing");<a name="line.115"></a>
-<span class="sourceLineNo">116</span>            <a name="line.116"></a>
+<span class="sourceLineNo">116</span><a name="line.116"></a>
 <span class="sourceLineNo">117</span>            // check that the default map implementation was loaded, as JCL was<a name="line.117"></a>
 <span class="sourceLineNo">118</span>            // forbidden from reading the HASHTABLE_IMPLEMENTATION_PROPERTY property.<a name="line.118"></a>
 <span class="sourceLineNo">119</span>            System.setSecurityManager(null);<a name="line.119"></a>
 <span class="sourceLineNo">120</span>            Field factoryField = c.getDeclaredField("factories");<a name="line.120"></a>
 <span class="sourceLineNo">121</span>            factoryField.setAccessible(true);<a name="line.121"></a>
-<span class="sourceLineNo">122</span>            Object factoryTable = factoryField.get(null); <a name="line.122"></a>
+<span class="sourceLineNo">122</span>            Object factoryTable = factoryField.get(null);<a name="line.122"></a>
 <span class="sourceLineNo">123</span>            assertNotNull(factoryTable);<a name="line.123"></a>
 <span class="sourceLineNo">124</span>            assertEquals(CustomHashtable.class.getName(), factoryTable.getClass().getName());<a name="line.124"></a>
-<span class="sourceLineNo">125</span>            <a name="line.125"></a>
-<span class="sourceLineNo">126</span>            assertEquals(0, untrustedCodeCount);<a name="line.126"></a>
-<span class="sourceLineNo">127</span>        } catch(Throwable t) {<a name="line.127"></a>
-<span class="sourceLineNo">128</span>            // Restore original security manager so output can be generated; the<a name="line.128"></a>
-<span class="sourceLineNo">129</span>            // PrintWriter constructor tries to read the line.separator<a name="line.129"></a>
-<span class="sourceLineNo">130</span>            // system property.<a name="line.130"></a>
-<span class="sourceLineNo">131</span>            System.setSecurityManager(oldSecMgr);<a name="line.131"></a>
-<span class="sourceLineNo">132</span>            StringWriter sw = new StringWriter();<a name="line.132"></a>
-<span class="sourceLineNo">133</span>            PrintWriter pw = new PrintWriter(sw);<a name="line.133"></a>
-<span class="sourceLineNo">134</span>            t.printStackTrace(pw);<a name="line.134"></a>
-<span class="sourceLineNo">135</span>            fail("Unexpected exception:" + t.getMessage() + ":" + sw.toString());<a name="line.135"></a>
-<span class="sourceLineNo">136</span>        }<a name="line.136"></a>
-<span class="sourceLineNo">137</span>    }<a name="line.137"></a>
-<span class="sourceLineNo">138</span>}<a name="line.138"></a>
+<span class="sourceLineNo">125</span><a name="line.125"></a>
+<span class="sourceLineNo">126</span>            // we better compare that we have no security exception during the call to log<a name="line.126"></a>
+<span class="sourceLineNo">127</span>            // IBM JVM tries to load bundles during the invoke call, which increase the count<a name="line.127"></a>
+<span class="sourceLineNo">128</span>            assertEquals(untrustedCodeCount, mySecurityManager.getUntrustedCodeCount());<a name="line.128"></a>
+<span class="sourceLineNo">129</span>        } catch(Throwable t) {<a name="line.129"></a>
+<span class="sourceLineNo">130</span>            // Restore original security manager so output can be generated; the<a name="line.130"></a>
+<span class="sourceLineNo">131</span>            // PrintWriter constructor tries to read the line.separator<a name="line.131"></a>
+<span class="sourceLineNo">132</span>            // system property.<a name="line.132"></a>
+<span class="sourceLineNo">133</span>            System.setSecurityManager(oldSecMgr);<a name="line.133"></a>
+<span class="sourceLineNo">134</span>            StringWriter sw = new StringWriter();<a name="line.134"></a>
+<span class="sourceLineNo">135</span>            PrintWriter pw = new PrintWriter(sw);<a name="line.135"></a>
+<span class="sourceLineNo">136</span>            t.printStackTrace(pw);<a name="line.136"></a>
+<span class="sourceLineNo">137</span>            fail("Unexpected exception:" + t.getMessage() + ":" + sw.toString());<a name="line.137"></a>
+<span class="sourceLineNo">138</span>        }<a name="line.138"></a>
+<span class="sourceLineNo">139</span>    }<a name="line.139"></a>
+<span class="sourceLineNo">140</span>}<a name="line.140"></a>
 
 
 

Modified: websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityForbiddenTestCase.CustomHashtable.html
==============================================================================
--- websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityForbiddenTestCase.CustomHashtable.html (original)
+++ websites/production/commons/content/proper/commons-logging/testapidocs/src-html/org/apache/commons/logging/security/SecurityForbiddenTestCase.CustomHashtable.html Tue Mar 19 21:07:31 2013
@@ -84,7 +84,7 @@
 <span class="sourceLineNo">076</span>        // save security manager so it can be restored in tearDown<a name="line.76"></a>
 <span class="sourceLineNo">077</span>        oldSecMgr = System.getSecurityManager();<a name="line.77"></a>
 <span class="sourceLineNo">078</span>    }<a name="line.78"></a>
-<span class="sourceLineNo">079</span>    <a name="line.79"></a>
+<span class="sourceLineNo">079</span><a name="line.79"></a>
 <span class="sourceLineNo">080</span>    public void tearDown() {<a name="line.80"></a>
 <span class="sourceLineNo">081</span>        // Restore, so other tests don't get stuffed up if a test<a name="line.81"></a>
 <span class="sourceLineNo">082</span>        // sets a custom security manager.<a name="line.82"></a>
@@ -93,7 +93,7 @@
 <span class="sourceLineNo">085</span><a name="line.85"></a>
 <span class="sourceLineNo">086</span>    /**<a name="line.86"></a>
 <span class="sourceLineNo">087</span>     * Test what happens when JCL is run with absolutely no security<a name="line.87"></a>
-<span class="sourceLineNo">088</span>     * priveleges at all, including reading system properties. Everything<a name="line.88"></a>
+<span class="sourceLineNo">088</span>     * privileges at all, including reading system properties. Everything<a name="line.88"></a>
 <span class="sourceLineNo">089</span>     * should fall back to the built-in defaults.<a name="line.89"></a>
 <span class="sourceLineNo">090</span>     */<a name="line.90"></a>
 <span class="sourceLineNo">091</span>    public void testAllForbidden() {<a name="line.91"></a>
@@ -101,44 +101,45 @@
 <span class="sourceLineNo">093</span>                LogFactory.HASHTABLE_IMPLEMENTATION_PROPERTY,<a name="line.93"></a>
 <span class="sourceLineNo">094</span>                CustomHashtable.class.getName());<a name="line.94"></a>
 <span class="sourceLineNo">095</span>        MockSecurityManager mySecurityManager = new MockSecurityManager();<a name="line.95"></a>
-<span class="sourceLineNo">096</span>        System.setSecurityManager(mySecurityManager);<a name="line.96"></a>
-<span class="sourceLineNo">097</span><a name="line.97"></a>
-<span class="sourceLineNo">098</span>        try {<a name="line.98"></a>
-<span class="sourceLineNo">099</span>            // Use reflection so that we can control exactly when the static<a name="line.99"></a>
-<span class="sourceLineNo">100</span>            // initialiser for the LogFactory class is executed.<a name="line.100"></a>
-<span class="sourceLineNo">101</span>            Class c = this.getClass().getClassLoader().loadClass(<a name="line.101"></a>
-<span class="sourceLineNo">102</span>                    "org.apache.commons.logging.LogFactory");<a name="line.102"></a>
-<span class="sourceLineNo">103</span>            Method m = c.getMethod("getLog", new Class[] {Class.class});<a name="line.103"></a>
-<span class="sourceLineNo">104</span>            Log log = (Log) m.invoke(null, new Object[] {this.getClass()});<a name="line.104"></a>
-<span class="sourceLineNo">105</span>            log.info("testing");<a name="line.105"></a>
-<span class="sourceLineNo">106</span>            <a name="line.106"></a>
-<span class="sourceLineNo">107</span>            // check that the default map implementation was loaded, as JCL was<a name="line.107"></a>
-<span class="sourceLineNo">108</span>            // forbidden from reading the HASHTABLE_IMPLEMENTATION_PROPERTY property.<a name="line.108"></a>
-<span class="sourceLineNo">109</span>            //<a name="line.109"></a>
-<span class="sourceLineNo">110</span>            // The default is either the java Hashtable class (java &lt; 1.2) or the<a name="line.110"></a>
-<span class="sourceLineNo">111</span>            // JCL WeakHashtable (java &gt;= 1.3).<a name="line.111"></a>
-<span class="sourceLineNo">112</span>            System.setSecurityManager(oldSecMgr);<a name="line.112"></a>
-<span class="sourceLineNo">113</span>            Field factoryField = c.getDeclaredField("factories");<a name="line.113"></a>
-<span class="sourceLineNo">114</span>            factoryField.setAccessible(true);<a name="line.114"></a>
-<span class="sourceLineNo">115</span>            Object factoryTable = factoryField.get(null); <a name="line.115"></a>
-<span class="sourceLineNo">116</span>            assertNotNull(factoryTable);<a name="line.116"></a>
-<span class="sourceLineNo">117</span>            String ftClassName = factoryTable.getClass().getName();<a name="line.117"></a>
-<span class="sourceLineNo">118</span>            assertTrue("Custom hashtable unexpectedly used", <a name="line.118"></a>
-<span class="sourceLineNo">119</span>                    !CustomHashtable.class.getName().equals(ftClassName));<a name="line.119"></a>
-<span class="sourceLineNo">120</span><a name="line.120"></a>
-<span class="sourceLineNo">121</span>            assertEquals(0, mySecurityManager.getUntrustedCodeCount());<a name="line.121"></a>
-<span class="sourceLineNo">122</span>        } catch(Throwable t) {<a name="line.122"></a>
-<span class="sourceLineNo">123</span>            // Restore original security manager so output can be generated; the<a name="line.123"></a>
-<span class="sourceLineNo">124</span>            // PrintWriter constructor tries to read the line.separator<a name="line.124"></a>
-<span class="sourceLineNo">125</span>            // system property.<a name="line.125"></a>
-<span class="sourceLineNo">126</span>            System.setSecurityManager(oldSecMgr);<a name="line.126"></a>
-<span class="sourceLineNo">127</span>            StringWriter sw = new StringWriter();<a name="line.127"></a>
-<span class="sourceLineNo">128</span>            PrintWriter pw = new PrintWriter(sw);<a name="line.128"></a>
-<span class="sourceLineNo">129</span>            t.printStackTrace(pw);<a name="line.129"></a>
-<span class="sourceLineNo">130</span>            fail("Unexpected exception:" + t.getMessage() + ":" + sw.toString());<a name="line.130"></a>
-<span class="sourceLineNo">131</span>        }<a name="line.131"></a>
-<span class="sourceLineNo">132</span>    }<a name="line.132"></a>
-<span class="sourceLineNo">133</span>}<a name="line.133"></a>
+<span class="sourceLineNo">096</span><a name="line.96"></a>
+<span class="sourceLineNo">097</span>        System.setSecurityManager(mySecurityManager);<a name="line.97"></a>
+<span class="sourceLineNo">098</span><a name="line.98"></a>
+<span class="sourceLineNo">099</span>        try {<a name="line.99"></a>
+<span class="sourceLineNo">100</span>            // Use reflection so that we can control exactly when the static<a name="line.100"></a>
+<span class="sourceLineNo">101</span>            // initialiser for the LogFactory class is executed.<a name="line.101"></a>
+<span class="sourceLineNo">102</span>            Class c = this.getClass().getClassLoader().loadClass(<a name="line.102"></a>
+<span class="sourceLineNo">103</span>                    "org.apache.commons.logging.LogFactory");<a name="line.103"></a>
+<span class="sourceLineNo">104</span>            Method m = c.getMethod("getLog", new Class[] {Class.class});<a name="line.104"></a>
+<span class="sourceLineNo">105</span>            Log log = (Log) m.invoke(null, new Object[] {this.getClass()});<a name="line.105"></a>
+<span class="sourceLineNo">106</span>            log.info("testing");<a name="line.106"></a>
+<span class="sourceLineNo">107</span><a name="line.107"></a>
+<span class="sourceLineNo">108</span>            // check that the default map implementation was loaded, as JCL was<a name="line.108"></a>
+<span class="sourceLineNo">109</span>            // forbidden from reading the HASHTABLE_IMPLEMENTATION_PROPERTY property.<a name="line.109"></a>
+<span class="sourceLineNo">110</span>            //<a name="line.110"></a>
+<span class="sourceLineNo">111</span>            // The default is either the java Hashtable class (java &lt; 1.2) or the<a name="line.111"></a>
+<span class="sourceLineNo">112</span>            // JCL WeakHashtable (java &gt;= 1.3).<a name="line.112"></a>
+<span class="sourceLineNo">113</span>            System.setSecurityManager(oldSecMgr);<a name="line.113"></a>
+<span class="sourceLineNo">114</span>            Field factoryField = c.getDeclaredField("factories");<a name="line.114"></a>
+<span class="sourceLineNo">115</span>            factoryField.setAccessible(true);<a name="line.115"></a>
+<span class="sourceLineNo">116</span>            Object factoryTable = factoryField.get(null);<a name="line.116"></a>
+<span class="sourceLineNo">117</span>            assertNotNull(factoryTable);<a name="line.117"></a>
+<span class="sourceLineNo">118</span>            String ftClassName = factoryTable.getClass().getName();<a name="line.118"></a>
+<span class="sourceLineNo">119</span>            assertTrue("Custom hashtable unexpectedly used",<a name="line.119"></a>
+<span class="sourceLineNo">120</span>                    !CustomHashtable.class.getName().equals(ftClassName));<a name="line.120"></a>
+<span class="sourceLineNo">121</span><a name="line.121"></a>
+<span class="sourceLineNo">122</span>            assertEquals(0, mySecurityManager.getUntrustedCodeCount());<a name="line.122"></a>
+<span class="sourceLineNo">123</span>        } catch(Throwable t) {<a name="line.123"></a>
+<span class="sourceLineNo">124</span>            // Restore original security manager so output can be generated; the<a name="line.124"></a>
+<span class="sourceLineNo">125</span>            // PrintWriter constructor tries to read the line.separator<a name="line.125"></a>
+<span class="sourceLineNo">126</span>            // system property.<a name="line.126"></a>
+<span class="sourceLineNo">127</span>            System.setSecurityManager(oldSecMgr);<a name="line.127"></a>
+<span class="sourceLineNo">128</span>            StringWriter sw = new StringWriter();<a name="line.128"></a>
+<span class="sourceLineNo">129</span>            PrintWriter pw = new PrintWriter(sw);<a name="line.129"></a>
+<span class="sourceLineNo">130</span>            t.printStackTrace(pw);<a name="line.130"></a>
+<span class="sourceLineNo">131</span>            fail("Unexpected exception:" + t.getMessage() + ":" + sw.toString());<a name="line.131"></a>
+<span class="sourceLineNo">132</span>        }<a name="line.132"></a>
+<span class="sourceLineNo">133</span>    }<a name="line.133"></a>
+<span class="sourceLineNo">134</span>}<a name="line.134"></a>
 
 
 



Mime
View raw message