river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter_firmst...@apache.org
Subject svn commit: r928394 [1/6] - in /incubator/river/jtsk/trunk: ./ qa/ qa/harness/policy/ qa/jtreg/net/jini/jeri/kerberos/UnitTests/ qa/jtreg/net/jini/jeri/transport/multihomed/ qa/jtreg/unittestlib/ qa/src/com/sun/jini/qa/harness/ qa/src/com/sun/jini/qa/r...
Date Sun, 28 Mar 2010 12:57:05 GMT
Author: peter_firmstone
Date: Sun Mar 28 12:57:03 2010
New Revision: 928394

URL: http://svn.apache.org/viewvc?rev=928394&view=rev
Log:
Note this commit may be reversed, it is primarily to allow other developers to participate in my recent experiments utilising the compiler options source=5 and target=jsr14 and relates to River-334

This commit also contains code relevant to River-323 to provide concurrency to DynamicPolicyProvider, additional packages and junit tests have been included.

Added:
    incubator/river/jtsk/trunk/src/com/sun/jini/tool/ProfilingSecurityManager.java   (with props)
    incubator/river/jtsk/trunk/src/manifest/concurrent-policy-uitl/
    incubator/river/jtsk/trunk/src/net/jini/security/policy/DynamicPolicyProviderImpl.java
      - copied, changed from r921640, incubator/river/jtsk/trunk/src/net/jini/security/policy/DynamicPolicyProvider.java
    incubator/river/jtsk/trunk/src/org/
    incubator/river/jtsk/trunk/src/org/apache/
    incubator/river/jtsk/trunk/src/org/apache/river/
    incubator/river/jtsk/trunk/src/org/apache/river/security/
    incubator/river/jtsk/trunk/src/org/apache/river/security/RevokePermission.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/RevokeablePermissionCollection.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/ConcurrentDynamicPolicyProvider.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/ConcurrentPermissions.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/ConcurrentPolicyFile.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/DyanamicConcurrentPolicyProvider.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/Grants.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/MultiReadPermissionCollection.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/PermissionPendingResolution.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/PermissionPendingResolutionCollection.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/concurrent/WeakGroup.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/spi/
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/spi/RevokeableDynamicPolicySpi.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/spi/RevokeablePolicy.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/DefaultPolicyParser.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/DefaultPolicyScanner.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/Messages.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/NullPolicyParser.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/PolicyEntry.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/PolicyParser.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/PolicyUtils.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/UnresolvedPrincipal.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/Util.java   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/security/policy/util/messages.properties   (with props)
    incubator/river/jtsk/trunk/src/org/apache/river/util/
    incubator/river/jtsk/trunk/src/org/apache/river/util/concurrent/
    incubator/river/jtsk/trunk/src/org/apache/river/util/concurrent/WeakIdentityMap.java   (with props)
    incubator/river/jtsk/trunk/test/src/net/
    incubator/river/jtsk/trunk/test/src/net/jini/
    incubator/river/jtsk/trunk/test/src/net/jini/security/
    incubator/river/jtsk/trunk/test/src/org/
    incubator/river/jtsk/trunk/test/src/org/apache/
    incubator/river/jtsk/trunk/test/src/org/apache/river/
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/concurrent/
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/concurrent/ConcurrentPermissionsTest.java   (with props)
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/concurrent/ConcurrentPolicyFileTest.java   (with props)
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/concurrent/MultiReadPermissionCollectionTest.java   (with props)
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/concurrent/PermissionCollectionTest.java   (with props)
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/concurrent/Permissions_ImplTest.java   (with props)
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/policy/
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/policy/util/
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/policy/util/DefaultPolicyParserTest.java   (with props)
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/policy/util/PolicyEntryTest.java   (with props)
    incubator/river/jtsk/trunk/test/src/org/apache/river/security/policy/util/PolicyUtilsTest.java   (with props)
    incubator/river/jtsk/trunk/test/src/tests/
    incubator/river/jtsk/trunk/test/src/tests/support/
    incubator/river/jtsk/trunk/test/src/tests/support/FakePrincipal.java   (with props)
    incubator/river/jtsk/trunk/test/src/tests/support/MyPrincipal.java   (with props)
    incubator/river/jtsk/trunk/test/src/tests/support/Support_Configuration.java   (with props)
    incubator/river/jtsk/trunk/test/src/tests/support/Support_Exec.java   (with props)
    incubator/river/jtsk/trunk/test/src/tests/support/Support_GetLocal.java   (with props)
    incubator/river/jtsk/trunk/test/src/tests/support/Support_Resources.java   (with props)
Modified:
    incubator/river/jtsk/trunk/build.xml
    incubator/river/jtsk/trunk/common.xml
    incubator/river/jtsk/trunk/qa/   (props changed)
    incubator/river/jtsk/trunk/qa/build.xml
    incubator/river/jtsk/trunk/qa/harness/policy/defaulttest.policy
    incubator/river/jtsk/trunk/qa/harness/policy/qa.policy
    incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/kerberos/UnitTests/TestUtilities.java
    incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/transport/multihomed/Multihomed.java
    incubator/river/jtsk/trunk/qa/jtreg/unittestlib/UnitTestUtilities.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/resources/qaDefaults.properties
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/jinitest.policy
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qa1.logging
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qaHarness.prop
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant01.policy
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant02.policy
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrantAll.policy
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoAccessClass.policy
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoGetProperty.policy
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderUmbrellaGrant.policy
    incubator/river/jtsk/trunk/src/com/sun/jini/action/GetPropertyAction.java
    incubator/river/jtsk/trunk/src/com/sun/jini/collection/WeakIdentityMap.java
    incubator/river/jtsk/trunk/src/com/sun/jini/tool/classdepend/ClassDepend.java
    incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceRegistrar.java
    incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java
    incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassProvider.java
    incubator/river/jtsk/trunk/src/net/jini/security/GrantPermission.java
    incubator/river/jtsk/trunk/src/net/jini/security/policy/DynamicPolicyProvider.java
    incubator/river/jtsk/trunk/src/net/jini/security/policy/PolicyFileProvider.java
    incubator/river/jtsk/trunk/src/net/jini/security/proxytrust/BasicUntrustedObjectSecurityContext.java

Modified: incubator/river/jtsk/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/build.xml?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/build.xml (original)
+++ incubator/river/jtsk/trunk/build.xml Sun Mar 28 12:57:03 2010
@@ -228,7 +228,7 @@
 			 doctitle="${javadoc.doc-title}"
 			 linkoffline="${jdk.doc.url} ${jdk.packages}"
 			 serialwarn="yes"
-			 source="1.4"
+			 source="5"
 			 use="true"
 			 version="true"
 			 windowtitle="${javadoc.win-title}">
@@ -305,6 +305,11 @@
             <package name="net.jini.security"/>
             <package name="net.jini.security.policy"/>
             <package name="net.jini.security.proxytrust"/>
+            <package name="org.apache.river.security"/>
+            <package name="org.apache.river.security.concurrent"/>
+            <package name="org.apache.river.security.policy.spi"/>
+            <package name="org.apache.river.security.policy.util"/>    
+            <package name="org.apache.river.util.concurrent"/>
             <package name="net.jini.space"/>
             <package name="net.jini.url.file"/>
             <package name="net.jini.url.httpmd"/>
@@ -325,7 +330,7 @@
 			 doctitle="${javadoc.spec.doc-title}"
 			 linkoffline="${jdk.doc.url} ${jdk.packages}"
 			 serialwarn="yes"
-			 source="1.4"
+			 source="5"
 			 use="true"
 			 version="true"
 			 windowtitle="${javadoc.spec.win-title}">
@@ -381,6 +386,7 @@
 			jsk-resources.jar,
 			jsk-platform.jar,
 			jsk-policy.jar,
+                        concurrent-policy-util.jar,
 			sun-util.jar" />
 
     <target name="services.jars" depends="toolswrappers.jars,
@@ -609,6 +615,7 @@
             <arg line="${jskprivate.include}"/>
             <arg line="-in com.sun.jini.tool"/>
             <arg value="com.sun.jini.tool.DebugDynamicPolicyProvider"/>
+            <arg value="com.sun.jini.tool.ProfilingSecurityManager"/>
         </classdep>
         <delete file="${lib.dir}/jsk-debug-policy.jar" quiet="true"/>
         <jar destfile="${lib.dir}/jsk-debug-policy.jar"
@@ -788,6 +795,7 @@
             <arg value="net.jini.security.policy.PolicyFileProvider"/>
             <arg line="-in com.sun.jini"/>
             <arg line="-in net.jini"/>
+            <arg line="-in org.apache.river"/>
         </classdep>
         <delete file="${lib-ext.dir}/jsk-policy.jar" quiet="true"/>
         <jar destfile="${lib-ext.dir}/jsk-policy.jar"
@@ -796,6 +804,27 @@
         </jar>
     </target>
 
+        <target name="concurrent-policy-util.jar">
+        <property name="concurrent-policy-util.deps" 
+                location="${build.deps.dir}/concurrent-policy-util.deps"/>
+        <classdep output="${concurrent-policy-util.deps}"
+                classpathref="classdep.classes.classpath">
+            <arg value="-cp"/>
+            <arg path="${build.classes.dir}"/>
+            <arg value="-files"/>
+            <arg value="org.apache.river.security.concurrent.ConcurrentPolicyFile"/>
+            <arg line="-in com.sun.jini"/>
+            <arg line="-in net.jini"/>
+            <arg line="-in org.apache.river"/>
+        </classdep>
+        <delete file="${lib-ext.dir}/concurrent-policy-util.jar" quiet="true"/>
+        <jar destfile="${lib-ext.dir}/concurrent-policy-util.jar"
+		     index="false">
+            <fileset dir="${build.classes.dir}" 
+                includesfile="${concurrent-policy-util.deps}"/>
+        </jar>
+    </target>
+
     <target name="jsk-resources.jar" depends="stubs">
         <delete file="${lib.dir}/jsk-resources.jar" quiet="true"/>
         <jar destfile="${lib.dir}/jsk-resources.jar"
@@ -1628,6 +1657,10 @@
             <arg value="com.sun.jini.phoenix.AbstractRegistry_Skel"/>
             <arg value="com.sun.jini.phoenix.AbstractRegistry_Stub"/>
             <arg value="com.sun.jini.phoenix.AbstractSystem_Stub"/>
+            <!--Why was the following class was missing from jar file,
+            is this a bug with ClassDep?
+            com.sun.jini.phoenix.Activation depends on this:-->
+            <arg value="com.sun.jini.phoenix.ConstrainableAID"/>
         </classdep>
         <delete file="${lib.dir}/phoenix.jar" quiet="true" />
         <jar destfile="${lib.dir}/phoenix.jar" index="false"

Modified: incubator/river/jtsk/trunk/common.xml
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/common.xml?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/common.xml (original)
+++ incubator/river/jtsk/trunk/common.xml Sun Mar 28 12:57:03 2010
@@ -168,8 +168,8 @@
         <attribute name="source.dir"/>
         <attribute name="dest.dir"/>
         <attribute name="debug" default="${debug}"/>
-        <attribute name="source" default="1.4"/>
-        <attribute name="target" default="1.4"/>
+        <attribute name="source" default="5"/>
+        <attribute name="target" default="jsr14"/>
         <element name="javac-cmd-elements" implicit="true" optional="true"/>
         <sequential>
             <javac fork="yes"
@@ -181,7 +181,7 @@
                     source="@{source}"
                     srcdir="@{source.dir}"
                     target="@{target}"
-                    verbose="no">
+                    verbose="yes">
                 <patternset refid="@{source.pat}"/>
                 <javac-cmd-elements/>
             </javac>

Propchange: incubator/river/jtsk/trunk/qa/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Mar 28 12:57:03 2010
@@ -3,3 +3,4 @@ lib-ext
 lib
 build.properties
 build
+LeaseRenewDurRFE-sharedVMDir-TestService_0

Modified: incubator/river/jtsk/trunk/qa/build.xml
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/build.xml?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/build.xml (original)
+++ incubator/river/jtsk/trunk/qa/build.xml Sun Mar 28 12:57:03 2010
@@ -161,6 +161,7 @@
             <!--<arg value="-Djava.security.debug=access,failure"/>-->
             <arg value="-Djavatest.maxOutputSize=500000"/>
             <!--<arg value="-Bug:6307813"/>-->
+            <!--<arg value="net/jini/security/policy/DynamicPolicyProvider/dynamicBasePolicy/Test.java"/>-->
             <!--<arg value="net/jini/security/GrantPermission/implies/Test.java" />-->
         </jtreg>
         <move todir="${river.lib.dir}">
@@ -196,19 +197,37 @@
         <element name="tr-elements" optional="true" implicit="true"/>
         <sequential>
             <java classname="com.sun.jini.qa.harness.QARunner" fork="yes" failOnError="true">
+                <!--Note these arguments only apply to the qa harness, they aren't
+                propagated to client test jvm's to do that you must set the
+                global or client vm args in the file:
+                src/com/sun/jini/resources/qaDefaults.properties-->
                 <!-- JDK extension directories (include our lib-ext dirs, for the custom policy providers) -->
+                <!--<jvmarg value="-Xbootclasspath/a:${river-ext.lib-dir}"/>-->
                 <jvmarg value="-Djava.ext.dirs=${ext.dirs}" />
+                <!--Use the following security manager if you need to discover which jar
+                file requires a particular permission, note this only works for the harness here -->
+                <!--<jvmarg value="-Djava.security.manager=com.sun.jini.tool.ProfilingSecurityManager"/>-->
+                <!--<jvmarg value="-Dpolicy.provider=net.jini.security.policy.DynamicPolicyProvider"/>-->
+                <!--Enable the following if you don't want to use any other policy's -->
+                <!--<jvmarg value="-Djava.security.policy==${security.policy}" />-->
                 <jvmarg value="-Djava.security.policy=${security.policy}" />
-                <!--<jvmarg value="-Djava.security.debug=access" />-->
+                <jvmarg value="-Djava.security.debug=access" />
                 <jvmarg value="-Djava.util.logging.config.file=${log.config}" />
                 <jvmarg value="-Dcom.sun.jini.jsk.home=${river.home}" />
                 <jvmarg value="-Dcom.sun.jini.qa.home=${basedir}" />
+                <!--We have a problem with path to properties and the src directory
+                it appears that the src directory was added later, however links
+                to property files aren't reflective of this and conflict with 
+                the path to those property files in jar archives needs looking into
+                this is now solved by setting the -->
                 <jvmarg value="-Dcom.sun.jini.test.home=${basedir}" />
+                <!--<jvmarg value="-DsearchPath=${basedir}/src,${basedir},${searchPath}"/>-->
+                <jvmarg value="-Dcom.sun.jini.qa.harness.harnessJar=${basedir}/lib/jiniharness.jar"/>
                 <jvmarg value="-Dcom.sun.jini.qa.harness.configs=${harness.configs}" />
                 <!-- VM args for each test run: include our JDK extension directories
                 $${com.sun.jini.qa.harness.globalvmargs},-Dcom.sun.jini.test.home=$${com.sun.jini.test.home},-Dcom.sun.jini.test.port=$${com.sun.jini.test.port},-Dcom.sun.jini.qa.harness.policies=&lt;url: com/sun/jini/test/resources/jinitest.policy&gt;-Djava.security.debug=access-->
-                <!--<jvmarg value="-Dcom.sun.jini.qa.harness.globalvmargs=$${com.sun.jini.qa.harness.globalvmargs},-Djava.ext.dirs=${ext.dirs},-Djava.security.debug=access"/>-->
-                <jvmarg value="-Dcom.sun.jini.qa.harness.globalvmargs=$${com.sun.jini.qa.harness.globalvmargs},-Djava.ext.dirs=${ext.dirs}"/>
+                <jvmarg value="-Dcom.sun.jini.qa.harness.globalvmargs=$${com.sun.jini.qa.harness.globalvmargs},-Djava.ext.dirs=${ext.dirs},-Djava.security.debug=access"/>
+                <!--<jvmarg value="-Dcom.sun.jini.qa.harness.globalvmargs=$${com.sun.jini.qa.harness.globalvmargs},-Djava.ext.dirs=${ext.dirs}"/>-->
                 <arg path="${src.dir}/com/sun/jini/test/resources/qaHarness.prop" />
                 <arg value="-testJar"/>
                 <arg path="${lib.dir}/jinitests.jar" />
@@ -230,7 +249,9 @@
     </macrodef>
 
     <target name="run-tests" depends="" description="Execute specific QA test(s)">
-        <property name="run.tests" value="com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.td"/>
+        <!--<property name="run.tests" value="com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.td"/>-->
+        <!--<property name="run.tests" value="com/sun/jini/test/impl/locatordiscovery/DelayDiscoveryAfterDiscard.td"/>-->
+        <property name="run.tests" value="com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.td"/>
         <testrun>
             <!-- Run specific test(s) -->
             <arg value="-tests"/>

Modified: incubator/river/jtsk/trunk/qa/harness/policy/defaulttest.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/harness/policy/defaulttest.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/harness/policy/defaulttest.policy (original)
+++ incubator/river/jtsk/trunk/qa/harness/policy/defaulttest.policy Sun Mar 28 12:57:03 2010
@@ -23,7 +23,7 @@ grant codebase "file:${com.sun.jini.qa.h
     permission java.security.AllPermission "", "";
 };
 
-grant codebase "file:${com.sun.jini.qa.home}${/}lib${/}harness.jar" {
+grant codebase "file:${com.sun.jini.qa.home}${/}lib${/}jiniharness.jar" {
     permission java.security.AllPermission "", "";
 };
 

Modified: incubator/river/jtsk/trunk/qa/harness/policy/qa.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/harness/policy/qa.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/harness/policy/qa.policy (original)
+++ incubator/river/jtsk/trunk/qa/harness/policy/qa.policy Sun Mar 28 12:57:03 2010
@@ -49,7 +49,7 @@ grant codebase "file:${com.sun.jini.qa.h
     permission java.io.FilePermission "/tmp", "read,write,execute,delete"; 
     permission java.io.FilePermission "/tmp/-", "read,write,execute,delete"; 
     permission java.io.FilePermission "/var/tmp", "read,write,execute,delete"; 
-    permission java.io.FilePermission "/var/tmp/-", "read,write,execute,delete"; 
+    permission java.io.FilePermission "/var/tmp/-", "read,write,execute,delete";
     // uncomment this one if you need lookup to accept file: codebases
     // permission java.io.FilePermission "<<ALL FILES>>", "read";
     permission java.lang.RuntimePermission "modifyThreadGroup";
@@ -70,7 +70,25 @@ grant codebase "file:${com.sun.jini.qa.h
     permission java.io.FilePermission "d:\\temp", "read,write,execute,delete"; 
     permission java.io.FilePermission "d:\\temp\\-", "read,write,execute,delete"; 
     permission java.io.FilePermission "d:\\windows\\temp", "read,write,execute,delete"; 
-    permission java.io.FilePermission "d:\\windows\\temp\\-", "read,write,execute,delete"; 
+    permission java.io.FilePermission "d:\\windows\\temp\\-", "read,write,execute,delete";
+    // THE FOLLOWING ARE REQUIRED IF UTILISING A SECURITY MANAGER FROM COMMAND LINE
+    // AT START UP.
+    // logging permissions
+    // permission java.util.logging.LoggingPermission "control";
+    // runtime permissions
+    //permission java.lang.RuntimePermission "createClassLoader";
+    //permission java.lang.RuntimePermission "accessClassInPackage.sun.util.logging.resources";
+    //permission java.lang.RuntimePermission "getClassLoader";
+    // property permissions
+    //permission java.util.PropertyPermission "*", "read,write";
+    //permission java.io.FilePermission "${com.sun.jini.jsk.home}${/}-", "read";
+    //permission java.io.FilePermission "${com.sun.jini.jsk.home}", "read";
+};
+    // THE FOLLOWING ARE REQUIRED IF UTILISING A SECURITY MANAGER FROM COMMAND LINE
+    // OR AT START UP.
+grant codebase "file:${com.sun.jini.qa.home}${/}lib${/}jinitests.jar" {
+    //permission java.util.PropertyPermission "net.jini.discovery.announce", "read";
+    //permission java.util.PropertyPermission "com.sun.jini.qa.harness.testhosts", "read";
 };
 
 grant codebase "file:${com.sun.jini.qa.home}${/}lib/qa1-jini-latest.jar" { 

Modified: incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/kerberos/UnitTests/TestUtilities.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/kerberos/UnitTests/TestUtilities.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/kerberos/UnitTests/TestUtilities.java (original)
+++ incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/kerberos/UnitTests/TestUtilities.java Sun Mar 28 12:57:03 2010
@@ -28,6 +28,7 @@ import java.io.File;
 import java.lang.reflect.Field;
 import java.security.AccessControlContext;
 import java.security.Permission;
+import java.security.PermissionCollection;
 import java.security.Permissions;
 import java.security.ProtectionDomain;
 import java.util.Properties;
@@ -118,7 +119,7 @@ class TestUtilities extends UnitTestUtil
     }
 
     public static AccessControlContext getContext(Permission[] perms) {
-	Permissions permissions = new Permissions();
+	PermissionCollection permissions = new Permissions();
 	if (perms != null) {
 	    for (int i = 0; i < perms.length; i++) {
 		if (perms[i] != null)

Modified: incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/transport/multihomed/Multihomed.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/transport/multihomed/Multihomed.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/transport/multihomed/Multihomed.java (original)
+++ incubator/river/jtsk/trunk/qa/jtreg/net/jini/jeri/transport/multihomed/Multihomed.java Sun Mar 28 12:57:03 2010
@@ -59,6 +59,7 @@ import java.rmi.server.ExportException;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.Permission;
+import java.security.PermissionCollection;
 import java.security.Permissions;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
@@ -281,7 +282,7 @@ public class Multihomed {
      * has only the specified permissions.
      **/
     private static AccessControlContext createAccWith(Permission[] perms) {
-	Permissions permissions = new Permissions();
+	PermissionCollection permissions = new Permissions();
 	for (int i = 0; i < perms.length; i++) {
 	    permissions.add(perms[i]);
 	}

Modified: incubator/river/jtsk/trunk/qa/jtreg/unittestlib/UnitTestUtilities.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/jtreg/unittestlib/UnitTestUtilities.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/jtreg/unittestlib/UnitTestUtilities.java (original)
+++ incubator/river/jtsk/trunk/qa/jtreg/unittestlib/UnitTestUtilities.java Sun Mar 28 12:57:03 2010
@@ -360,7 +360,7 @@ public class UnitTestUtilities {
 	ProtectionDomain domain = UnitTestUtilities.class.getProtectionDomain();
 	PermissionCollection origPerms =
 	    Policy.getPolicy().getPermissions(domain);
-	Permissions perms = new Permissions();
+	PermissionCollection perms = new Permissions();
 	for (Enumeration en = origPerms.elements();
 	     en.hasMoreElements(); )
 	{

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java Sun Mar 28 12:57:03 2010
@@ -1654,8 +1654,8 @@ public class QAConfig implements Seriali
 	    getStringConfigVal("com.sun.jini.qa.harness.globalvmargs", null);
 	return parseArgList(vmArgs);
      }
-
-    /**
+     
+     /**
      * Return an array of VM options extracted from the given array
      * of combined options and properties. These are structured
      * to be input to service starter descriptions, i.e. one

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java Sun Mar 28 12:57:03 2010
@@ -602,6 +602,8 @@ public class TestDescription implements 
 	String testClass   = getTestClassName();
 	ArrayList cmdList = new ArrayList(10);
 	cmdList.add(getJVM());
+        // Uncomment the following line if you want to debug permission requests
+        //cmdList.add("-Djava.security.manager=com.sun.jini.tool.ProfilingSecurityManager");
 	cmdList.add("-Djava.security.policy=" + getPolicyFile());
 	if (getCodebase() != null) {
 	    cmdList.add("-Djava.rmi.server.codebase=" + getCodebase());

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/resources/qaDefaults.properties
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/resources/qaDefaults.properties?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/resources/qaDefaults.properties (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/resources/qaDefaults.properties Sun Mar 28 12:57:03 2010
@@ -213,6 +213,8 @@ com.sun.jini.qa.harness.actdeathdelay=5
 #      
 # no cosmetic whitespace
 com.sun.jini.qa.harness.globalvmargs=\
+-Djava.ext.dirs=${java.ext.dirs},\
+-Djava.security.debug=access,\
 -Dcom.sun.jini.jsk.port=${com.sun.jini.jsk.port},\
 -Dcom.sun.jini.qa.port=${com.sun.jini.qa.port},\
 -Dcom.sun.jini.jsk.home=${com.sun.jini.jsk.home},\
@@ -269,4 +271,3 @@ com.sun.jini.qa.harness.defaultTestConfi
 
 # all additional defs should be done self-referentially
 testOverrideProviders=com.sun.jini.qa.harness.StoreOverrideProvider
-

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/jinitest.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/jinitest.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/jinitest.policy (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/jinitest.policy Sun Mar 28 12:57:03 2010
@@ -9,6 +9,7 @@ grant codebase "file:${com.sun.jini.test
 
 grant {
 	permission java.io.FilePermission "${com.sun.jini.test.home}${/}lib${/}-", "read";
+        permission java.util.PropertyPermission "com.sun.jini.reggie.enableImplToStubReplacement", "read";
 };
 
 grant codebase "file:${com.sun.jini.test.home}${/}lib${/}qa1-start-tests.jar" {
@@ -23,6 +24,29 @@ grant codebase "file:${com.sun.jini.test
     permission java.security.AllPermission "", "";
 };
 
+// Grants required for jdk1.6 combined with source=5 and target=jsr14
+// I think this has something to do with the new java 6 Policy implementation,
+// the visibility of our policy implementations on the boot classpath and
+// jdk1.6 compiler optimisations. See River-334
+grant codebase "file:${com.sun.jini.jsk.home}${/}lib-ext${/}*" {
+    permission java.security.AllPermission "", "";
+    //permission java.security.SecurityPermission "getProperty.net.jini.security.policy.PolicyFileProvider.basePolicyClass";
+    //permission java.util.PropertyPermission "java.security.policy", "read";
+    //permission java.util.PropertyPermission "java.security.policy", "write";
+    //permission java.lang.RuntimePermission "accessClassInPackage.sun.security.provider";
+    //permission java.lang.RuntimePermission "getProtectionDomain";
+    //permission net.jini.security.GrantPermission "java.security.AllPermission \"\", \"\"";
+};
+
+// Grants required for jdk1.6 combined with source=5 and target=jsr14
+// I think this has something to do with the new java 6 Policy implementation,
+// the visibility of our policy implementations on the boot classpath and
+// jdk1.6 compiler optimisations. See River-334
+grant codebase "file:${com.sun.jini.test.home}${/}lib-ext${/}*" {
+    permission java.security.AllPermission "", "";
+};
+
+
 grant codebase "file:${com.sun.jini.qa.harness.testJar}" {
     permission net.jini.security.GrantPermission
         "java.security.AllPermission \"\", \"\"";

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qa1.logging
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qa1.logging?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qa1.logging (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qa1.logging Sun Mar 28 12:57:03 2010
@@ -39,7 +39,7 @@ handlers = java.util.logging.ConsoleHand
 # level setting (set below) to limit messages printed to
 # the console.
 
-.level = INFO
+.level = FINEST
 
 ############################################################
 # Handler specific properties: formatters and logger levels
@@ -104,10 +104,10 @@ java.util.logging.FileHandler.level = IN
 #  FINEST (lowest value) 
 
 # For Everything
-sun.rmi.level = INFO
-net.jini.level = INFO
+sun.rmi.level = FINEST
+net.jini.level = FINEST
 
-com.sun.jini.level = INFO
+com.sun.jini.level = FINEST
 
 # For the LogManager
 com.sun.jini.logging.LogManager.level = INFO
@@ -159,9 +159,9 @@ net.jini.jeri.BasicInvocationHandler.lev
 net.jini.iiop.IiopExporter.level = INFO
 
 # For Preferred Classes
-net.jini.loader.level = INFO
-#net.jini.loader.pref.PreferredClassLoader.level = INFO
-#net.jini.loader.pref.PreferredClassLoader.preferred.level = INFO
+net.jini.loader.level = FINEST
+net.jini.loader.pref.PreferredClassLoader.level = FINEST
+net.jini.loader.pref.PreferredClassLoader.preferred.level = FINEST
 #net.jini.loader.pref.PreferredClassLoader.exception.level = INFO
 #net.jini.loader.pref.PreferredClassProvider.level = INFO
 

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qaHarness.prop
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qaHarness.prop?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qaHarness.prop (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/resources/qaHarness.prop Sun Mar 28 12:57:03 2010
@@ -26,13 +26,13 @@
 ######################################################
 
 # location of the JSK installation
-com.sun.jini.jsk.home=${user.home}/river/jtsk/trunk
+# com.sun.jini.jsk.home=${user.home}/river/jtsk/trunk
 
 # Location of the harness installation
-com.sun.jini.qa.home=${user.home}/river/qatests/trunk/source/vob/qa
+# com.sun.jini.qa.home=${user.home}/river/qatests/trunk/source/vob/qa
 
 # Location of the tests installation
-com.sun.jini.test.home=${user.home}/river/qatests/trunk/source/vob/qa
+# com.sun.jini.test.home=${user.home}/river/qatests/trunk/source/vob/qa
 
 ######################################################
 #
@@ -216,9 +216,12 @@ testOverrideProviders=${testOverrideProv
 com.sun.jini.qa.harness.globalvmargs=${com.sun.jini.qa.harness.globalvmargs},\
 -Dcom.sun.jini.test.home=${com.sun.jini.test.home},\
 -Dcom.sun.jini.test.port=${com.sun.jini.test.port},\
--Dcom.sun.jini.qa.harness.policies=<url: com/sun/jini/test/resources/jinitest.policy>
+-Dcom.sun.jini.qa.harness.policies=<url: src/com/sun/jini/test/resources/jinitest.policy>
 
 # make sure slave's use their local test home directory
 com.sun.jini.qa.harness.slaveOverrides=${com.sun.jini.qa.harness.slaveOverrides} com.sun.jini.test.home
 
-searchPath=${com.sun.jini.test.home},${searchPath}
+# The src directory was newly added after the ant build conversion now policy
+# files attempts succeed and don't need to be loaded from jar files.
+# This makes life a lot easier while trying to change policy files during debugging.
+searchPath=${com.sun.jini.test.home}/src,${searchPath}

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant01.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant01.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant01.policy (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant01.policy Sun Mar 28 12:57:03 2010
@@ -37,7 +37,7 @@ grant {
         "accessClassInPackage.sun.security.provider";
     permission java.security.SecurityPermission "getDomainCombiner";
     permission java.security.SecurityPermission "createAccessControlContext";
-
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
 };
 
 /*

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant02.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant02.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant02.policy (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrant02.policy Sun Mar 28 12:57:03 2010
@@ -66,6 +66,7 @@ grant { 
     permission java.lang.RuntimePermission "setIO";
     permission javax.security.auth.AuthPermission "createLoginContext.com.sun.jini.Test";
     permission javax.security.auth.AuthPermission "doAs";
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
 
 
     // Allow reflection to examine service starter framework classes

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrantAll.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrantAll.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrantAll.policy (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderGrantAll.policy Sun Mar 28 12:57:03 2010
@@ -23,7 +23,7 @@ grant {
     permission java.security.SecurityPermission "getPolicy";
     permission java.security.SecurityPermission "getDomainCombiner";
     permission java.security.SecurityPermission "createAccessControlContext";
-
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
     permission java.security.SecurityPermission
         "getProperty.net.jini.security.policy.*";
     permission java.security.SecurityPermission

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoAccessClass.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoAccessClass.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoAccessClass.policy (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoAccessClass.policy Sun Mar 28 12:57:03 2010
@@ -38,6 +38,7 @@ grant { 
     permission java.lang.RuntimePermission "getProtectionDomain";
     permission javax.security.auth.AuthPermission "createLoginContext.com.sun.jini.Test";
     permission javax.security.auth.AuthPermission "doAs";
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
 
     // Allow reflection to examine service starter framework classes
     permission java.lang.RuntimePermission "accessDeclaredMembers";

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoGetProperty.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoGetProperty.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoGetProperty.policy (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderNoGetProperty.policy Sun Mar 28 12:57:03 2010
@@ -43,6 +43,7 @@ grant { 
     permission java.lang.RuntimePermission "getProtectionDomain";
     permission javax.security.auth.AuthPermission "createLoginContext.com.sun.jini.Test";
     permission javax.security.auth.AuthPermission "doAs";
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
 
     // Allow reflection to examine service starter framework classes
     permission java.lang.RuntimePermission "accessDeclaredMembers";

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderUmbrellaGrant.policy
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderUmbrellaGrant.policy?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderUmbrellaGrant.policy (original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/policyprovider/dynamicPolicyProvider/policyProviderUmbrellaGrant.policy Sun Mar 28 12:57:03 2010
@@ -76,6 +76,7 @@ grant { 
     permission java.lang.RuntimePermission "setIO";
     permission javax.security.auth.AuthPermission "createLoginContext.com.sun.jini.Test";
     permission javax.security.auth.AuthPermission "doAs";
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
 
     // Allow reflection to examine service starter framework classes
     permission java.lang.RuntimePermission "accessDeclaredMembers";

Modified: incubator/river/jtsk/trunk/src/com/sun/jini/action/GetPropertyAction.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/com/sun/jini/action/GetPropertyAction.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/com/sun/jini/action/GetPropertyAction.java (original)
+++ incubator/river/jtsk/trunk/src/com/sun/jini/action/GetPropertyAction.java Sun Mar 28 12:57:03 2010
@@ -23,6 +23,7 @@ import com.sun.jini.logging.LogUtil;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.logging.Logger;
+import java.util.logging.Level;
 import net.jini.security.Security;
 
 /**
@@ -58,7 +59,7 @@ public class GetPropertyAction implement
 
     private static final Logger logger =
 	Logger.getLogger("com.sun.jini.action.GetPropertyAction");
-
+    
     private final String theProp;
     private final String defaultVal;
 
@@ -104,12 +105,14 @@ public class GetPropertyAction implement
 		return value;
 	    }
 	} catch (SecurityException e) {
-	    if (logger.isLoggable(Levels.HANDLED)) {
-		LogUtil.logThrow(logger, Levels.HANDLED,
-		    GetPropertyAction.class, "run",
-		    "security exception reading \"{0}\", returning {1}",
-		    new Object[] { theProp, defaultVal }, e);
-	    }
+	    if (logger.isLoggable(Level.FINE)) {
+		logger.logp( Level.FINE,
+		    GetPropertyAction.class.toString(), "run()",
+		    "security exception reading \"" + theProp + "\", returning "
+                    + defaultVal,
+		     e);
+                throw e;
+	    }             
 	}
 	return defaultVal;
     }

Modified: incubator/river/jtsk/trunk/src/com/sun/jini/collection/WeakIdentityMap.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/com/sun/jini/collection/WeakIdentityMap.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/com/sun/jini/collection/WeakIdentityMap.java (original)
+++ incubator/river/jtsk/trunk/src/com/sun/jini/collection/WeakIdentityMap.java Sun Mar 28 12:57:03 2010
@@ -23,26 +23,32 @@ import java.lang.ref.WeakReference;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
 
 /**
- * Identity-based weak hash map.
+ * Identity-based weak hash map.  Updated to support Generics and Map<K,V> on
+ * 22nd March 2010
  *
+ * @param K Object Key used for identity
+ * @param V Object Value
  * @author Sun Microsystems, Inc.
- *
+ * @author Peter Firmstone 
+ * @version 2.0 - Generic Support and Map<K,V> added.
  * @since 2.0
  */
-public class WeakIdentityMap {
+public class WeakIdentityMap<K,V> implements Map<K,V>{
 
     // REMIND: optimize implementation (clone new java.util.WeakHashMap?)
 
-    private final Map map = new HashMap();
+    private final Map<Key, V> map = new HashMap<Key, V>();
     private final ReferenceQueue queue = new ReferenceQueue();
 
     /**
      * Associates value with given key, returning value previously associated
      * with key, or null if none.
      */
-    public Object put(Object key, Object value) {
+    public V put(K key, V value) {
 	processQueue();
 	return map.put(Key.create(key, queue), value);
     }
@@ -50,7 +56,7 @@ public class WeakIdentityMap {
     /**
      * Returns value associated with given key, or null if none.
      */
-    public Object get(Object key) {
+    public V get(Object key) {
 	processQueue();
 	return map.get(Key.create(key, null));
     }
@@ -59,7 +65,7 @@ public class WeakIdentityMap {
      * Removes association for given key, returning value previously associated
      * with key, or null if none.
      */
-    public Object remove(Object key) {
+    public V remove(Object key) {
 	processQueue();
 	return map.remove(Key.create(key, null));
     }
@@ -67,7 +73,7 @@ public class WeakIdentityMap {
     /**
      * Returns collection containing all values currently held in this map.
      */
-    public Collection values() {
+    public Collection<V> values() {
 	processQueue();
 	return map.values();
     }
@@ -87,30 +93,28 @@ public class WeakIdentityMap {
 	}
     }
 
-    private static class Key extends WeakReference {
+    private static class Key<T> extends WeakReference<T> {
 
 	private final int hash;
 
+        @SuppressWarnings("unchecked")
 	static Key create(Object k, ReferenceQueue q) {
-	    if (k == null) {
-		return null;
-	    } else if (q == null) {
-		return new Key(k);
-	    } else {
-		return new Key(k, q);
-	    }
+	    //if (k == null) {return null;} Not so sure we should return null
+            if (q == null) {return new Key(k);} 
+            return new Key(k, q);
 	}
 
-	private Key(Object k) {
+	private Key(T k) {
 	    super(k);
 	    hash = System.identityHashCode(k);
 	}
 
-	private Key(Object k, ReferenceQueue q) {
+	private Key(T k, ReferenceQueue<? super T> q) {
 	    super(k, q);
 	    hash = System.identityHashCode(k);
 	}
 
+        @Override
 	public boolean equals(Object o) {
 	    if (this == o) {
 		return true;
@@ -121,8 +125,37 @@ public class WeakIdentityMap {
 	    return (k1 != null && k2 != null && k1 == k2);
 	}
 
+        @Override
 	public int hashCode() {
 	    return hash;
 	}
     }
+
+    public int size() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public boolean isEmpty() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public boolean containsKey(Object key) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public boolean containsValue(Object value) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public void putAll(Map<? extends K, ? extends V> m) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public Set<K> keySet() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public Set<Entry<K, V>> entrySet() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
 }

Added: incubator/river/jtsk/trunk/src/com/sun/jini/tool/ProfilingSecurityManager.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/com/sun/jini/tool/ProfilingSecurityManager.java?rev=928394&view=auto
==============================================================================
--- incubator/river/jtsk/trunk/src/com/sun/jini/tool/ProfilingSecurityManager.java (added)
+++ incubator/river/jtsk/trunk/src/com/sun/jini/tool/ProfilingSecurityManager.java Sun Mar 28 12:57:03 2010
@@ -0,0 +1,241 @@
+/*
+ 
+ * Copyright (c) 2006 Mark Petrovic <mspetrovic@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Original Author: Mark Petrovic <mspetrovic@gmail.com>
+ *
+*/
+
+package com.sun.jini.tool;
+
+import static java.lang.System.err;
+import static java.lang.System.out;
+
+import java.lang.reflect.Field;
+
+import java.net.URL;
+
+import java.security.AccessController;
+import java.security.AccessControlContext;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.ProtectionDomain;
+
+import java.util.ArrayList;
+
+/**
+ * <code>ProfilingSecurityManager</code> is a Java security manager that profiles
+ * what resources an application accesses, and in what manner --- e.g., read, write, etc.  It does not enforce a
+ * security policy, but rather produces a starting point for crafting one.
+ * <p>
+ * It extends <code>java.lang.SecurityManager</code> and overrides the two forms of the <code>checkPermission()</code> method.
+ * For each call to <code>checkPermission()</code>, <code>ProfilingSecurityManager</code> first guards against the
+ * condition that it itself induced the call to <code>checkPermission()</code>, which would result in
+ * unterminated recursion.  If a call to <code>checkPermission()</code> resulted from a call outside
+ * <code>ProfilingSecurityManager</code>, the current context is examined and each class found therein is
+ * profiled as needing access to the <code>java.security.Permission</code> in question.
+ *
+ * Profiling is manifested as a writing to <code>System.out</code> a "grant" rule for each <code>java.security.Permission</code> requested
+ * on a per <code>CodeBase</code> basis.
+ *
+ * The implementation here does some very simple rule caching.  If a rule has been seen previously, it is not output to System.out.
+ * The caching cannot prevent a security check, but it can reduce I/O during profiling.
+ *
+ * @author Mark S. Petrovic
+ */
+public class ProfilingSecurityManager extends SecurityManager {
+    
+    /* Variables of pure convenience */
+    final private String thisClassName;
+    final private String thisCodeSourceURLString;
+    final private String psmMsg = "ProfilingSecurityManager";
+    final private ArrayList<String> cacheList = new ArrayList<String>();
+    
+    // ---------------------------------
+    
+    public ProfilingSecurityManager() {
+        thisClassName=this.getClass().getName();
+        CodeSource thisCodeSource = this.getClass().getProtectionDomain().getCodeSource();
+        thisCodeSourceURLString = thisCodeSource.getLocation().toString();
+    }
+    
+    // -----------------
+    
+    @Override
+    public void checkPermission(final Permission permission) {
+        final Throwable t = new Throwable("Profiler stack probe");
+        final StackTraceElement[] stack = t.getStackTrace();
+        // Avoid recursion owing to actions in this class itself inducing callbacks
+        if( !isRecur(stack) ) {
+            buildRules(permission, AccessController.getContext());
+        }
+    }
+    
+    // -----------------
+    
+    @Override
+    public void checkPermission(final Permission permission, final Object context) {
+        buildRules(permission, (AccessControlContext)context);
+    }
+    
+    // -----------------
+    
+    // With a Permission and an AccessControlContext, we can build and print rules
+    private void buildRules(final Permission permission, final AccessControlContext ctx) {
+        try {
+           final ProtectionDomain[] protectionDomain = getProtectionDomains(ctx);
+           if( null != protectionDomain ) {
+              for(int i=0;i<protectionDomain.length;++i) {
+                 final String grant = formatRule(permission, protectionDomain[i]);
+                 if( null != grant && !isCached(grant)) {
+                    out.println(grant);
+                 }
+              }
+           }
+        }
+        catch(IllegalStateException e) {
+           e.printStackTrace();
+        }
+    }
+    
+    // -----------------
+    
+    /*
+      Traverse the stack, returning true if the stack indicates we called ourself.
+    */
+    private boolean isRecur(final StackTraceElement[] st) {
+        boolean v = false;
+        for(int i=st.length-1;i>=1;--i) {
+            final boolean c = st[i].getClassName().equals(thisClassName);
+            final boolean m = st[i].getMethodName().equals("buildRules");
+            if (c && m)  {
+                v = true;
+                break;
+            }
+        }
+        return v;
+    }
+    
+    // -----------------
+    
+   /* Get the protection domains by Java reflection.  There is no public API for this info,
+    * making this code Sun Java 1.5 JVM implementation dependent.
+    */
+    private ProtectionDomain[] getProtectionDomains(final AccessControlContext context) throws 
+       IllegalStateException {
+        ProtectionDomain[] pda = null;
+        try {
+            final Field[] fields = AccessControlContext.class.getDeclaredFields();
+            if( null == fields ) {
+               throw new IllegalStateException("No fields");
+            }
+            for(int i=0; i<fields.length; ++i ) {
+                if( fields[i].getName().equals("context") ) {  // Warning:  JVM-dependent works with JVM 5 and 6
+                    fields[i].setAccessible(true);
+                    final Object o = fields[i].get(context);
+                    pda = (ProtectionDomain[] )o;
+                    break;
+                }
+            }
+
+            // No 'context' field found, throw exception.
+            if( null == pda ) {
+               throw new IllegalStateException("No \"context\" Field found!");
+            }
+
+        }
+        catch (IllegalAccessException e) {
+           e.printStackTrace();
+        }
+        finally {
+           return pda;
+        }
+    }
+    
+    // -----------------
+    
+    private String formatRule(final Permission permission, final ProtectionDomain pd) {
+        final CodeSource cs = pd.getCodeSource();
+
+        if ( null == cs ) {
+            return null;
+        }
+        final URL url = cs.getLocation();
+        if( null == url ) {
+           return null;
+        }
+
+        // Remove ProfilingSecurityManager.class codebase from output rule consideration 
+        if( url.toString().equals(thisCodeSourceURLString) ) {
+            return null;
+        }
+        
+        final StringBuilder sb = new StringBuilder();
+        sb.append("grant codeBase \"");
+        sb.append(url.toString());
+        sb.append("\" {");
+        sb.append("permission ");
+        sb.append(" ");
+        sb.append(permission.getClass().getName());
+        sb.append(" ");
+        sb.append("\"");
+
+        /* Some complex permissions have quoted strings embedded or
+        literal carriage returns that must be escaped.  */
+
+        final String permissionName = permission.getName();
+        final String escapedPermissionName = permissionName.replace("\"","\\\"").replace("\r","\\\r");
+
+        sb.append(escapedPermissionName);
+        sb.append("\", ");
+        sb.append("\"");
+        sb.append(permission.getActions());
+        sb.append("\";");
+        sb.append("};");
+        return sb.toString();
+    }
+    
+    // -----------------
+    
+    /*
+       If the rule has been seen during this runtime invocation, do not print it again.
+    */
+    private boolean isCached(final String candidate) {
+        synchronized(cacheList) {
+           for(String s : cacheList) {
+               if( s.equals(candidate) ) {
+                   return true;
+               }
+           }
+           cacheList.add(candidate);
+        }
+        return false;
+    }
+    
+    // -----------------
+    
+    @Override
+    public String toString() {
+        return "SecurityManager:  " + psmMsg;
+    }
+    
+}
\ No newline at end of file

Propchange: incubator/river/jtsk/trunk/src/com/sun/jini/tool/ProfilingSecurityManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/river/jtsk/trunk/src/com/sun/jini/tool/classdepend/ClassDepend.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/com/sun/jini/tool/classdepend/ClassDepend.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/com/sun/jini/tool/classdepend/ClassDepend.java (original)
+++ incubator/river/jtsk/trunk/src/com/sun/jini/tool/classdepend/ClassDepend.java Sun Mar 28 12:57:03 2010
@@ -511,7 +511,7 @@ public class ClassDepend {
      * is null.
      * @param string
      * @param pattern
-     * @return 
+     * @return True if the Pattern Matches
      */
     public boolean matches(String string, Pattern pattern) {
 	return pattern != null && pattern.matcher(string).matches();
@@ -520,7 +520,7 @@ public class ClassDepend {
     /**
      * Returns a literal pattern String for the specified String.
      * Added to backport Java 1.5 sources to 1.4.  adds the functionality
-     * of java.util.regex.Patter.quote() method missing from Java 1.4 version
+     * of java.util.regex.Pattern.quote() method missing from Java 1.4 version
      *
      * This method produces a String that can be used to create a 
      * Pattern that would match the string s as if it were a literal pattern.

Modified: incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceRegistrar.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceRegistrar.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceRegistrar.java (original)
+++ incubator/river/jtsk/trunk/src/net/jini/core/lookup/ServiceRegistrar.java Sun Mar 28 12:57:03 2010
@@ -19,8 +19,9 @@ package net.jini.core.lookup;
 
 import java.rmi.RemoteException;
 import java.rmi.MarshalledObject;
-import net.jini.core.event.*;
 import net.jini.core.discovery.LookupLocator;
+import net.jini.core.event.EventRegistration;
+import net.jini.core.event.RemoteEventListener;
 
 /**
  * Defines the interface to the lookup service.  The interface is not a

Modified: incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java (original)
+++ incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java Sun Mar 28 12:57:03 2010
@@ -239,7 +239,7 @@ public class PreferredClassLoader extend
     private final String exportAnnotation;
 
     /** permissions required to access loader through public API */
-    private final Permissions permissions;
+    private final PermissionCollection permissions;
 
     /** security context for loading classes and resources */
     private final AccessControlContext acc;
@@ -445,7 +445,7 @@ public class PreferredClassLoader extend
 		    final boolean requireDlPerm)
     {
 	/* ensure caller has permission to access all urls */
-	Permissions perms = new Permissions();
+	PermissionCollection perms = new Permissions();
 	addPermissionsForURLs(urls, perms, false);
 	checkPermissions(perms);
 
@@ -1038,7 +1038,7 @@ public class PreferredClassLoader extend
      * Check that the current access control context has all of the
      * given permissions.
      */
-    private static void checkPermissions(Permissions perms) {
+    private static void checkPermissions(PermissionCollection perms) {
 	SecurityManager sm = System.getSecurityManager();
 	if (sm != null) {		// should never be null?
 	    Enumeration en = perms.elements();

Modified: incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassProvider.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassProvider.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassProvider.java (original)
+++ incubator/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassProvider.java Sun Mar 28 12:57:03 2010
@@ -18,10 +18,8 @@
 
 package net.jini.loader.pref;
 
-import com.sun.jini.action.GetPropertyAction;
 import com.sun.jini.logging.Levels;
 import com.sun.jini.logging.LogUtil;
-import java.io.FilePermission;
 import java.io.IOException;
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.SoftReference;
@@ -30,15 +28,14 @@ import java.lang.reflect.Modifier;
 import java.lang.reflect.Proxy;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.net.URLConnection;
 import java.net.URLClassLoader;
-import java.rmi.server.RMIClassLoader;
 import java.rmi.server.RMIClassLoaderSpi;
 import java.security.AccessController;
-import java.security.CodeSource;
 import java.security.Permission;
+import java.security.PermissionCollection;
 import java.security.Permissions;
 import java.security.PrivilegedAction;
+import java.security.Security;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -49,7 +46,6 @@ import java.util.WeakHashMap;
 import java.util.logging.Logger;
 import java.util.logging.Level;
 import net.jini.loader.ClassAnnotation;
-import net.jini.loader.DownloadPermission;
 
 /**
  * An <code>RMIClassLoader</code> provider that supports preferred
@@ -220,8 +216,9 @@ import net.jini.loader.DownloadPermissio
  *
  * </table>
  **/
+@SuppressWarnings("unchecked")
 public class PreferredClassProvider extends RMIClassLoaderSpi {
-
+    
     /** encodings for primitive array class element types */
     private static final String PRIMITIVE_TYPES = "BCDFIJSZ";
 
@@ -237,35 +234,70 @@ public class PreferredClassProvider exte
 
     private static final Permission getClassLoaderPermission =
 	new RuntimePermission("getClassLoader");
-
+    
     /**
-     * value of "java.rmi.server.codebase" property, as cached at class
-     * initialization time.  It may contain malformed URLs.
+     * value of "java.rmi.server.codebase" property, was cached at class
+     * initialization time, now lazy loaded as required and cached at 
+     * runtime. It may contain malformed URLs.
      */
-    private static String codebaseProperty = null;
-    static {
-	String prop = (String) AccessController.doPrivileged(
-            new GetPropertyAction("java.rmi.server.codebase"));
+    private static volatile String codebaseProperty = null;
+    
+    private static String getCodebaseProperty() {
+//	String prop = (String) AccessController.doPrivileged(
+//            new GetPropertyAction("java.rmi.server.codebase"));
+        if (codebaseProperty != null) return codebaseProperty;
+        String prop = null;
+        try{                 
+           prop = (String) AccessController.doPrivileged(
+                    new PrivilegedAction() {
+                public Object run() {
+                    String value = Security.getProperty("java.rmi.server.codebase");	    
+                    return value;                 
+                }
+            });
+        } catch (SecurityException ex){
+            logger.log(Level.FINE, "unable to retrieve property:" +
+                    " java.rmi.server.codebase", ex);            
+        }        
 	if (prop != null && prop.trim().length() > 0) {
+            // Don't care about atomic operation, if intervening thread
+            // updates, it just get's updated again.
 	    codebaseProperty = prop;
+            return prop;
 	}
+        return codebaseProperty;
     }
 
     /** table of "local" class loaders */
     private static final Map localLoaders =
 	Collections.synchronizedMap(new WeakHashMap());
-    static {
-	AccessController.doPrivileged(new PrivilegedAction() {
-	    public Object run() {
-		for (ClassLoader loader = ClassLoader.getSystemClassLoader();
-		     loader != null;
-		     loader = loader.getParent())
-		{
-		    localLoaders.put(loader, null);
-		}
-		return null;
-	    }
-	});
+    
+    /**
+     * Return true if the given loader is the system class loader or
+     * its parent (i.e. the loader for installed extensions) or the null
+     * class loader
+     */
+    private static boolean isLocalLoader(ClassLoader loader) {
+        if (localLoaders.isEmpty()) {
+            try{
+                AccessController.doPrivileged(new PrivilegedAction() {
+                    public Object run() {
+                        for (ClassLoader loader = ClassLoader.getSystemClassLoader();
+                             loader != null;
+                             loader = loader.getParent())
+                        {
+                            localLoaders.put(loader, null);
+                        }
+                        return null;
+                    }
+                });
+            }catch (SecurityException ex) {
+                logger.logp(Level.FINE, "net.jini.loader.pref.PreferredClassProvider",
+                        "isLocalLoader(ClassLoader loader)" ,"unable to retrieve" +
+                        " System ClassLoader", ex);
+            } 
+        }
+	return (loader == null || localLoaders.containsKey(loader));      
     }
 
     /**
@@ -324,9 +356,9 @@ public class PreferredClassProvider exte
      **/
     protected PreferredClassProvider(boolean requireDlPerm) {
 	SecurityManager sm = System.getSecurityManager();
-	if (sm != null) {
-	    sm.checkCreateClassLoader();
-	}
+            if (sm != null) {
+                sm.checkCreateClassLoader();
+            }
 	this.requireDlPerm = requireDlPerm;
 	initialized = true;
     }
@@ -765,7 +797,7 @@ public class PreferredClassProvider exte
      **/
     protected String getClassAnnotation(ClassLoader loader) {
 	checkInitialized();
-	return codebaseProperty;
+        return getCodebaseProperty();
     }
 
     /**
@@ -801,7 +833,7 @@ public class PreferredClassProvider exte
 		    if (check) {
 			SecurityManager sm = System.getSecurityManager();
 			if (sm != null) {
-			    Permissions perms = new Permissions();
+			    PermissionCollection perms = new Permissions();
 			    for (int i = 0; i < urls.length; i++) {
 				Permission p =
 				    urls[i].openConnection().getPermission();
@@ -838,14 +870,7 @@ public class PreferredClassProvider exte
 	}
     }
 
-    /**
-     * Return true if the given loader is the system class loader or
-     * its parent (i.e. the loader for installed extensions) or the null
-     * class loader
-     */
-    private static boolean isLocalLoader(ClassLoader loader) {
-	return (loader == null || localLoaders.containsKey(loader));
-    }
+
     
     /**
      * Provides the implementation for {@link

Modified: incubator/river/jtsk/trunk/src/net/jini/security/GrantPermission.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/net/jini/security/GrantPermission.java?rev=928394&r1=928393&r2=928394&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/net/jini/security/GrantPermission.java (original)
+++ incubator/river/jtsk/trunk/src/net/jini/security/GrantPermission.java Sun Mar 28 12:57:03 2010
@@ -41,7 +41,6 @@ import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import net.jini.security.policy.DynamicPolicy;
 
 /**
  * Permission required to dynamically grant permissions by security policy
@@ -676,7 +675,7 @@ public final class GrantPermission exten
     private static class Implier {
 	
 	private final PermissionCollection perms = new Permissions();
-	private final ArrayList unresolved = new ArrayList();
+	private final List unresolved =new ArrayList();
 
 	void add(GrantPermission gp) {
 	    for (int i = 0; i < gp.grants.length; i++) {
@@ -753,7 +752,8 @@ public final class GrantPermission exten
      * @serial include
      */
     static class GrantPermissionCollection extends PermissionCollection {
-
+        // All access is synchronized through GrantPermissionCollection
+        // Nothing within should use synchronization 
 	private static final long serialVersionUID = 8227621799817733985L;
 
 	/**



Mime
View raw message