Permalink
Browse files

Refactoring for release, clean up and review new public api, sanity c…

…heck and remove unnecessary methods.

Added dnsjava name service provider to handle reverse dns lookup and to provide concurrent dns lookups.

Updated reference-collections, these were updated to avoid calling hashCode during initialisation of Timed references and temporary referrers, this helped reduced SocketPermission.hashCode calls that caused reverse lookups and recursive permission checks that cause stack overflow in the CombinerSecurityManager.

Two tests are failling due to a change to ConcurrentPolicyFile, now only privileged domains are returned by getPermissions(CodeSource) and all other instances are diverted to the java.security.Policy superclass which returns an empty PermissionCollection this is to avoid checking permissions twice.

Failing tests:

com/sun/jini/test/impl/start/aggregatepolicyprovider/SubPoliciesTest.td
com/sun/jini/test/impl/start/loadersplitpolicyprovider/LoaderSplitPolicyProviderTest.td


git-svn-id: https://svn.apache.org/repos/asf/river/jtsk/trunk@1355851 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 8a66b03 commit 00598ea5d2972a18687840342f324fe58c3bda1a Peter Firmstone committed Jul 1, 2012
View
@@ -528,6 +528,9 @@
<fileset refid="high-scale-lib.jars"/>
<fileset refid="reference-collections.jar"/>
</copy>
+ <copy todir="lib-ext">
+ <fileset refid="dnsjava.jar"/>
+ </copy>
</target>
<!-- The following two targets should no longer be necessary.
@@ -2181,14 +2184,14 @@
<mkdir dir="${test.classes.dir}"/>
<mkdir dir="${test.results.dir}"/>
<copy file="dep-libs/high-scale-lib/high-scale-lib.jar" todir="test/lib"/>
- <copy file="dep-libs/rc-libs/reference-collections-1.0.0.jar" todir="test/lib"/>
+ <copy file="dep-libs/rc-libs/reference-collections-1.0.1.jar" todir="test/lib"/>
</target>
<target name="clean-tests" depends="">
<delete dir="${test.classes.dir}" quiet="true"/>
<delete dir="${test.results.dir}" quiet="true"/>
<delete file="test/lib/high-scale-lib.jar" quiet="true"/>
- <delete file="test/lib/reference-collections-1.0.0.jar" quiet="true"/>
+ <delete file="test/lib/reference-collections-1.0.1.jar" quiet="true"/>
</target>
<target name="compile-tests" depends="compile,prep-tests">
View
@@ -139,7 +139,11 @@
</fileset>
<fileset id="reference-collections.jar" dir="${root}/dep-libs/rc-libs">
- <include name="reference-collections-1.0.0.jar" />
+ <include name="reference-collections-1.0.1.jar" />
+ </fileset>
+
+ <fileset id="dnsjava.jar" dir="${root}/dep-libs/dnsjava">
+ <include name="dnsjava-2.1.3.jar" />
</fileset>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -34,13 +34,13 @@ file.reference.asm-3.2.jar=../../dep-libs/asm/asm-3.2.jar
file.reference.asm-commons-3.2.jar=../../dep-libs/asm/asm-commons-3.2.jar
file.reference.asm-tree-3.2.jar=../../dep-libs/asm/asm-tree-3.2.jar
file.reference.high-scale-lib.jar=../../dep-libs/high-scale-lib/high-scale-lib.jar
-file.reference.reference-collections-1.0.0.jar=../../dep-libs/rc-libs/reference-collections-1.0.0.jar
+file.reference.reference-collections-1.0.1.jar=../../dep-libs/rc-libs/reference-collections-1.0.1.jar
file.reference.river-jstk-trunk-src=../../src
file.reference.velocity-1.7.jar=../../dep-libs/velocity/velocity-1.7.jar
includes=**
jar.compress=false
javac.classpath=\
- ${file.reference.reference-collections-1.0.0.jar}:\
+ ${file.reference.reference-collections-1.0.1.jar}:\
${file.reference.asm-3.2.jar}:\
${file.reference.asm-commons-3.2.jar}:\
${file.reference.asm-tree-3.2.jar}:\
View
@@ -207,7 +207,7 @@
<file name="phoenix-init.jar"/>
<file name="tools.jar"/>
<file name="classserver.jar"/>
- <file name="reference-collections-1.0.0.jar"/>
+ <file name="reference-collections-1.0.1.jar"/>
<file name="high-scale-lib.jar"/>
</filelist>
</move>
@@ -216,7 +216,7 @@
errorproperty="jtreg.fail" failureproperty="jtreg.fail"
reportdir="${jtreg.dir}/JTreport" workdir="${jtreg.dir}/JTwork"
jdk="${jdk.home}">
- <arg value="-cpa:${jtlib.tmp}/jsk-policy.jar${path.separator}${jtlib.tmp}/jsk-lib.jar${path.separator}${jtlib.tmp}/jsk-platform.jar${path.separator}${jtlib.tmp}/jsk-resources.jar${path.separator}${jtlib.tmp}/phoenix-init.jar${path.separator}${jtlib.tmp}/tools.jar${path.separator}${jtlib.tmp}/classserver.jar${path.separator}${jtlib.tmp}/reference-collections-1.0.0.jar${path.separator}${jtlib.tmp}/high-scale-lib.jar"/>
+ <arg value="-cpa:${jtlib.tmp}/jsk-policy.jar${path.separator}${jtlib.tmp}/jsk-lib.jar${path.separator}${jtlib.tmp}/jsk-platform.jar${path.separator}${jtlib.tmp}/jsk-resources.jar${path.separator}${jtlib.tmp}/phoenix-init.jar${path.separator}${jtlib.tmp}/tools.jar${path.separator}${jtlib.tmp}/classserver.jar${path.separator}${jtlib.tmp}/reference-collections-1.0.1.jar${path.separator}${jtlib.tmp}/high-scale-lib.jar"/>
<arg value="-timeout:8"/>
<!--<arg value="-Djsk.home=${river.home}"/>-->
<arg value="-Djtlib.tmp=${jtlib.tmp}"/>
@@ -253,7 +253,7 @@
<file name="phoenix-init.jar"/>
<file name="tools.jar"/>
<file name="classserver.jar"/>
- <file name="reference-collections-1.0.0.jar"/>
+ <file name="reference-collections-1.0.1.jar"/>
<file name="high-scale-lib.jar"/>
</filelist>
</move>
@@ -273,7 +273,7 @@
<file name="phoenix-init.jar"/>
<file name="tools.jar"/>
<file name="classserver.jar"/>
- <file name="reference-collections-1.0.0.jar"/>
+ <file name="reference-collections-1.0.1.jar"/>
<file name="high-scale-lib.jar"/>
</filelist>
</move>
@@ -337,7 +337,7 @@
<include name="jsk-platform.jar"/>
<include name="jsk-lib.jar"/>
<include name="high-scale-lib.jar"/>
- <include name="reference-collections-1.0.0.jar"/>
+ <include name="reference-collections-1.0.1.jar"/>
</fileset>
</classpath>
<env key="SOUL" value="${soul}"/>
@@ -132,7 +132,7 @@ net.jini.space.JavaSpace.preparername=test.outriggerPreparer
# For the shared activation group and its SharedGroupImpl
#
sharedGroup.type=group
-sharedGroup.classpath=${com.sun.jini.jsk.home}$/lib$/sharedvm.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.0.jar
+sharedGroup.classpath=${com.sun.jini.jsk.home}$/lib$/sharedvm.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.1.jar
sharedGroup.starterConfiguration=<url:harness/configs/<config>/starter/starter.config>
sharedGroup.policyfile=<url:harness/policy/defaultsharedvm.policy>
sharedGroup.implPrefix=sharedGroupImpl
@@ -154,7 +154,7 @@ sharedGroupImpl.preparername=test.groupPreparer
nonActivatableGroup.type=nonactivatablegroup
nonActivatableGroup.impl=com.sun.jini.qa.harness.NonActivatableGroupImpl
nonActivatableGroup.component=nonActivatableGroup
-nonActivatableGroup.classpath=${com.sun.jini.qa.home}$/lib$/nonactivatablegroup.jar$:${com.sun.jini.jsk.home}$/lib$/start.jar$:${com.sun.jini.jsk.home}$/lib$/jsk-platform.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.0.jar
+nonActivatableGroup.classpath=${com.sun.jini.qa.home}$/lib$/nonactivatablegroup.jar$:${com.sun.jini.jsk.home}$/lib$/start.jar$:${com.sun.jini.jsk.home}$/lib$/jsk-platform.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.1.jar
nonActivatableGroup.codebase=http://${HOST}:${com.sun.jini.qa.port}/nonactivatablegroup-dl.jar
nonActivatableGroup.policyfile=<url:harness/policy/defaultnonactvm.policy>
nonActivatableGroup.serverjvmargs=-server,${nonActivatableGroup.serverjvmargs}
@@ -252,11 +252,11 @@ testPolicyfile=<url:harness/policy/defaulttest.policy>
# The default classpath. This property must be defined, and must include
# all Jini dependencies as components
-testClasspath=<harnessJar>$:<testJar>$:${com.sun.jini.jsk.home}$/lib$/jsk-platform.jar$:${com.sun.jini.jsk.home}$/lib$/jsk-lib.jar$:${com.sun.jini.jsk.home}$/lib$/high-scale-lib.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.0.jar
+testClasspath=<harnessJar>$:<testJar>$:${com.sun.jini.jsk.home}$/lib$/jsk-platform.jar$:${com.sun.jini.jsk.home}$/lib$/jsk-lib.jar$:${com.sun.jini.jsk.home}$/lib$/high-scale-lib.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.1.jar
# Alternate test classpath, for tests that don't use <testJar>
#
-altClasspath=<harnessJar>$:${com.sun.jini.jsk.home}$/lib$/jsk-platform.jar$:${com.sun.jini.jsk.home}$/lib$/jsk-lib.jar$:${com.sun.jini.jsk.home}$/lib$/high-scale-lib.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.0.jar
+altClasspath=<harnessJar>$:${com.sun.jini.jsk.home}$/lib$/jsk-platform.jar$:${com.sun.jini.jsk.home}$/lib$/jsk-lib.jar$:${com.sun.jini.jsk.home}$/lib$/high-scale-lib.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.1.jar
#
# Services run with server vm; test runs with client vm
@@ -2,3 +2,6 @@ testClass=com.sun.jini.test.impl.discoverymanager.BadDiscoveryListener
testCategories=discoverymanager,discoverymanager_impl
include0=discoverymanager.properties
include1=com/sun/jini/test/share/reggie3_2.properties
+#testjvmargs=-Xdebug,\
+#-Xrunjdwp:transport=dt_socket+,address=8000+,server=y+,suspend=y,\
+#${testjvmargs}
@@ -32,4 +32,4 @@ com.sun.jini.test.impl.start.ClassLoaderTest2.starterConfiguration=${com.sun.jin
com.sun.jini.test.impl.start.ClassLoaderTest2.host=master
include0=start.properties
-sharedGroup.classpath=${com.sun.jini.jsk.home}$/lib$/sharedvm.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.0.jar$:<file:lib/qa1-start-testservice-common.jar>
+sharedGroup.classpath=${com.sun.jini.jsk.home}$/lib$/sharedvm.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.1.jar$:<file:lib/qa1-start-testservice-common.jar>
@@ -33,7 +33,7 @@ com.sun.jini.test.impl.start.ClasspathTest2.starterConfiguration=${com.sun.jini.
com.sun.jini.test.impl.start.ClasspathTest2.host=master
// Shared group overrides
-sharedGroup.classpath=${com.sun.jini.jsk.home}$/lib$/sharedvm.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.0.jar$:<file:lib/qa1-start-testservice-common.jar>
+sharedGroup.classpath=${com.sun.jini.jsk.home}$/lib$/sharedvm.jar$:${com.sun.jini.jsk.home}$/lib$/reference-collections-1.0.1.jar$:<file:lib/qa1-start-testservice-common.jar>
sharedGroup.codebase=http://${HOST}:${com.sun.jini.jsk.port}/create-dl.jar http://${HOST}:${com.sun.jini.test.port}/qa1-start-testservice-common-dl.jar
sharedGroup.policy=<url:harness/policy/all.policy>
include0=start.properties
@@ -6,7 +6,7 @@ com.sun.jini.qa.harness.runjiniserver=false
FILEPOLICY01=<url: policyProviderGrant01.policy>
FILEPOLICY02=<url: policyProviderGrant02.policy>
FILEPOLICYUMBRELLA=<url: policyProviderUmbrellaGrant.policy>
-com.sun.jini.qa.harness.securityproperties=<url: ../securityprovider.properties>
+com.sun.jini.qa.harness.securityproperties=<url: ./securityprovider.properties>
#testjvmargs=-Xdebug,\
#-Xrunjdwp:transport=dt_socket+,address=8000+,server=y+,suspend=y,\
#${testjvmargs}
@@ -6,7 +6,7 @@ com.sun.jini.qa.harness.runjiniserver=false
FILEPOLICY01=<url: policyProviderGrant01.policy>
FILEPOLICY02=<url: policyProviderGrant02.policy>
FILEPOLICYUMBRELLA=<url: policyProviderUmbrellaGrant.policy>
-com.sun.jini.qa.harness.securityproperties=<url: ../securityprovider.properties>
+com.sun.jini.qa.harness.securityproperties=<url: ./securityprovider.properties>
#testjvmargs=-Xdebug,\
#-Xrunjdwp:transport=dt_socket+,address=8000+,server=y+,suspend=y,\
#${testjvmargs}
@@ -0,0 +1,4 @@
+# Java security properties file which overrides the harness supplied
+# file so that the ConcurrentPolicy is not used, which would interfere
+# with the correct operation of BasicGrants and UmbrellaGrants
+net.jini.security.policy.PolicyFileProvider.basePolicyClass=sun.security.provider.PolicyFile

0 comments on commit 00598ea

Please sign in to comment.