river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter_firmst...@apache.org
Subject svn commit: r882120 - in /incubator/river/jtsk/trunk/qa/src/com/sun/jini: qa/harness/ test/spec/config/configurationfile/ test/spec/config/configurationprovider/ test/spec/security/basicproxypreparer/ test/spec/security/security/
Date Thu, 19 Nov 2009 11:57:50 GMT
Author: peter_firmstone
Date: Thu Nov 19 11:57:35 2009
New Revision: 882120

URL: http://svn.apache.org/viewvc?rev=882120&view=rev
Log:
Changes to getURL methods to fix occasional hang due to malformed URL

Modified:
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/Constructor_Test.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryInternal_Test.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryNames_Test.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryType_Test.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntryType_Test.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntry_Test.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/ToString_Test.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationprovider/GetInstance_QATest.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/basicproxypreparer/Verify_Test.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyCodebaseIntegrityTest.java
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyObjectTrustTest.java

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=882120&r1=882119&r2=882120&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 Thu Nov 19 11:57:35
2009
@@ -438,7 +438,7 @@
 		throw new TestException("test jar found not found: " + testJar);
 	    }
 	    try {
-		URL testJarURL = testJarFile.getCanonicalFile().toURL();
+		URL testJarURL = testJarFile.getCanonicalFile().toURI().toURL();
 		testLoader = new URLClassLoader(new URL[]{testJarURL},
 						getClass().getClassLoader());
 	    } catch (Exception e) {
@@ -707,7 +707,7 @@
 	File entryFile = getComponentFile(entryName, td);
 	if (entryFile != null) { 
 	    try {
-		return entryFile.getCanonicalFile().toURL();
+		return entryFile.getCanonicalFile().toURI().toURL();
 	    } catch (Exception e) {
 		throw new TestException("problem converting file to url", e);
 	    }

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/Constructor_Test.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/Constructor_Test.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/Constructor_Test.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/Constructor_Test.java
Thu Nov 19 11:57:35 2009
@@ -194,7 +194,7 @@
         String[] optionsWithDash = { "-" };
         callConstructor(testCase, confFile, optionsWithDash);
 
-        URL confFileURL = confFile.toURL();
+        URL confFileURL = confFile.toURI().toURL();
         logger.log(Level.INFO,
                 "File URL=" + confFileURL.toString());
         String[] optionsWithFileURL = { confFileURL.toString() };
@@ -267,7 +267,7 @@
                         + " element is invalid url");
             }
 
-            unexistConfFileURL = unexistConfFile.toURL();
+            unexistConfFileURL = unexistConfFile.toURI().toURL();
             String[] optionsWithUnexistFileURL = { 
                     unexistConfFileURL.toString() };
             try {

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryInternal_Test.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryInternal_Test.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryInternal_Test.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryInternal_Test.java
Thu Nov 19 11:57:35 2009
@@ -265,7 +265,7 @@
                 + entryLine
                 + ";\n}\n";
             createFile(confFile, conf);
-            URL confFileURL = confFile.toURL();
+            URL confFileURL = confFile.toURI().toURL();
             String[] optionsWithURL = { confFileURL.toString() };
             return (FakeConfigurationFile) callConstructor(
                     testCase, confFileURL, optionsWithURL);

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryNames_Test.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryNames_Test.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryNames_Test.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryNames_Test.java
Thu Nov 19 11:57:35 2009
@@ -212,7 +212,7 @@
                 String[] optionsWithFile = { confFile.getPath() };
                 options = optionsWithFile;
             } else if (testSubCase == OPT_URL_SUBCASE) {
-                URL confFileURL = confFile.toURL();
+                URL confFileURL = confFile.toURI().toURL();
                 String[] optionsWithURL = { confFileURL.toString() };
                 options = optionsWithURL;
             } else { // if (testSubCase == OPT_OVERRIDE_SUBCASE) {

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryType_Test.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryType_Test.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryType_Test.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetEntryType_Test.java
Thu Nov 19 11:57:35 2009
@@ -284,7 +284,7 @@
                 + entryLine
                 + ";\n}\n";
             createFile(confFile, conf);
-            URL confFileURL = confFile.toURL();
+            URL confFileURL = confFile.toURI().toURL();
             String[] optionsWithURL = { confFileURL.toString() };
             return (FakeConfigurationFile) callConstructor(
                     testCase, confFileURL, optionsWithURL);

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntryType_Test.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntryType_Test.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntryType_Test.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntryType_Test.java
Thu Nov 19 11:57:35 2009
@@ -130,7 +130,7 @@
                 + entryLine
                 + ";\n}\n";
             createFile(confFile, conf);
-            URL confFileURL = confFile.toURL();
+            URL confFileURL = confFile.toURI().toURL();
             String[] optionsWithURL = { confFileURL.toString() };
             return (FakeConfigurationFile) callConstructor(
                     testCase, confFileURL, optionsWithURL);

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntry_Test.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntry_Test.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntry_Test.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/GetSpecialEntry_Test.java
Thu Nov 19 11:57:35 2009
@@ -130,7 +130,7 @@
                 + entryLine
                 + ";\n}\n";
             createFile(confFile, conf);
-            URL confFileURL = confFile.toURL();
+            URL confFileURL = confFile.toURI().toURL();
             String[] optionsWithURL = { confFileURL.toString() };
             return (FakeConfigurationFile) callConstructor(
                     testCase, confFileURL, optionsWithURL);

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/ToString_Test.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/ToString_Test.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/ToString_Test.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationfile/ToString_Test.java
Thu Nov 19 11:57:35 2009
@@ -368,7 +368,7 @@
         String[] optionsWithDash = { "-" };
         checkVariant(testCase, confFile, optionsWithDash);
 
-        URL confFileURL = confFile.toURL();
+        URL confFileURL = confFile.toURI().toURL();
         logger.log(Level.INFO,
                 "File URL=" + confFileURL.toString());
         String[] optionsWithFileURL = { confFileURL.toString() };

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationprovider/GetInstance_QATest.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationprovider/GetInstance_QATest.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationprovider/GetInstance_QATest.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/config/configurationprovider/GetInstance_QATest.java
Thu Nov 19 11:57:35 2009
@@ -1,4 +1,4 @@
-/*
+ /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -126,7 +126,7 @@
         File confResource = new File(servicesDir.getPath(),
                 "net.jini.config.Configuration");
         createFile(confResource, content);
-        URL classURL = classDir.toURL();
+        URL classURL = classDir.toURI().toURL();
         URL[] urls = { classURL };
         return urls;
     }

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/basicproxypreparer/Verify_Test.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/basicproxypreparer/Verify_Test.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/basicproxypreparer/Verify_Test.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/basicproxypreparer/Verify_Test.java
Thu Nov 19 11:57:35 2009
@@ -148,7 +148,7 @@
         // 2 If proxy is not null, if verify is true, if trusted
         File jarFile = Util.createResourceJar(resName,
                 new Class[] { TrueTrustVerifier.class });
-        URL[] urls = { jarFile.toURL() };
+        URL[] urls = { jarFile.toURI().toURL() };
         ClassLoader testCl = new URLClassLoader(urls);
         Thread.currentThread().setContextClassLoader(testCl);
 

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyCodebaseIntegrityTest.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyCodebaseIntegrityTest.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyCodebaseIntegrityTest.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyCodebaseIntegrityTest.java
Thu Nov 19 11:57:35 2009
@@ -192,7 +192,7 @@
                 if (useNullLoader[i]) {
                     testCl = null;
                 } else {
-                    testCl = new FakeClassLoader(jarFile.toURL());
+                    testCl = new FakeClassLoader(jarFile.toURI().toURL());
                 }
 
                 try {
@@ -226,10 +226,10 @@
                     if (useNullLoader[i]) {
                         testCl = null;
                     } else {
-                        testCl = new FakeClassLoader(jarFile.toURL());
+                        testCl = new FakeClassLoader(jarFile.toURI().toURL());
                     }
                     Thread.currentThread().setContextClassLoader(
-                            new FakeClassLoader(jarFile.toURL()));
+                            new FakeClassLoader(jarFile.toURI().toURL()));
 
                     try {
                         callVerifyCodebaseIntegrity(testUrls[k], testCl);

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyObjectTrustTest.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyObjectTrustTest.java?rev=882120&r1=882119&r2=882120&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyObjectTrustTest.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/spec/security/security/VerifyObjectTrustTest.java
Thu Nov 19 11:57:35 2009
@@ -210,6 +210,7 @@
      * This method performs all actions mentioned in class description.
      *
      */
+    @SuppressWarnings("deprecation")
     public void run() throws Exception {
         File jarFile = null;
         Object testObj = new TestObject();
@@ -391,6 +392,7 @@
      * @param obj Object for 'verifyObjectTrust' method
      * @param loader ClassLoader for 'verifyObjectTrust' method
      * @param context Collection for 'verifyObjectTrust' method
+     * @throws java.rmi.RemoteException 
      */
     protected void callVerifyObjectTrust(Object obj, ClassLoader loader,
             Collection context) throws RemoteException {



Mime
View raw message