geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r379102 - /geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanNameTest.java
Date Mon, 20 Feb 2006 11:43:15 GMT
Author: gdamour
Date: Mon Feb 20 03:43:10 2006
New Revision: 379102

URL: http://svn.apache.org/viewcvs?rev=379102&view=rev
Log:
Clear the propery "java.rmi.server.codebase" prior to use MarshalledObject. When building
with M2, the codebase property is set to the test classpath and if the M2 repo directory contains
a space, the codebase cannot be successfully parsed.

Modified:
    geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanNameTest.java

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanNameTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanNameTest.java?rev=379102&r1=379101&r2=379102&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanNameTest.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanNameTest.java Mon
Feb 20 03:43:10 2006
@@ -164,7 +164,17 @@
 
     public void testSerialization() throws Exception {
         GBeanName name = new GBeanName("testDomain:prop1=value1,prop2=value2");
-        MarshalledObject o = new MarshalledObject(name);
+        String codeBaseProperty = "java.rmi.server.codebase";
+        String codeBase = System.getProperty(codeBaseProperty);
+        MarshalledObject o;
+        try {
+            System.clearProperty(codeBaseProperty);
+            o = new MarshalledObject(name);
+        } finally {
+            if (null != codeBase) {
+                System.setProperty(codeBaseProperty, codeBase);
+            }
+        }
         GBeanName name2 = (GBeanName) o.get();
         assertEquals(name, name2);
     }



Mime
View raw message