directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r106394 - /incubator/directory/naming/trunk/core/src/java/org/apache/naming/resources/FileDirContext.java /incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java
Date Wed, 24 Nov 2004 08:42:19 GMT
Author: brett
Date: Wed Nov 24 00:42:18 2004
New Revision: 106394

Modified:
   incubator/directory/naming/trunk/core/src/java/org/apache/naming/resources/FileDirContext.java
   incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java
Log:
normalize docBase for correct behaviour of getNameInNamespace under Windows.
All string representations of paths must be normalized.


Modified: incubator/directory/naming/trunk/core/src/java/org/apache/naming/resources/FileDirContext.java
Url: http://svn.apache.org/viewcvs/incubator/directory/naming/trunk/core/src/java/org/apache/naming/resources/FileDirContext.java?view=diff&rev=106394&p1=incubator/directory/naming/trunk/core/src/java/org/apache/naming/resources/FileDirContext.java&r1=106393&p2=incubator/directory/naming/trunk/core/src/java/org/apache/naming/resources/FileDirContext.java&r2=106394
==============================================================================
--- incubator/directory/naming/trunk/core/src/java/org/apache/naming/resources/FileDirContext.java
(original)
+++ incubator/directory/naming/trunk/core/src/java/org/apache/naming/resources/FileDirContext.java
Wed Nov 24 00:42:18 2004
@@ -42,7 +42,7 @@
  * Filesystem Directory Context implementation helper class.
  *
  * @author Remy Maucherat
- * @version $Revision: 1.2 $ $Date: 2003/10/13 08:15:54 $
+ * @version $Revision$ $Date: 2003/10/13 08:15:54 $
  */
 
 public class FileDirContext extends BaseDirContext {
@@ -136,7 +136,7 @@
 	    throw new IllegalArgumentException
 		(sm.getString("fileResources.base", docBase));
         this.absoluteBase = base.getAbsolutePath();
-        super.setDocBase(docBase);
+        super.setDocBase(normalize(docBase));
 
     }
 

Modified: incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java
Url: http://svn.apache.org/viewcvs/incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java?view=diff&rev=106394&p1=incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java&r1=106393&p2=incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java&r2=106394
==============================================================================
--- incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java
(original)
+++ incubator/directory/naming/trunk/core/src/test/org/apache/naming/resources/FileDirContextTest.java
Wed Nov 24 00:42:18 2004
@@ -35,7 +35,7 @@
 /**
  * Unit tests for basic ops on a {@link FileDirContext}.
  *  
- * @version $Revision: 1.2 $ $Date: 2003/11/30 05:36:07 $
+ * @version $Revision$ $Date: 2003/11/30 05:36:07 $
  */
 public class FileDirContextTest extends AbstractDirContextTest {
     
@@ -126,10 +126,10 @@
     }
     
     public void testGetNameInNamespace() throws Exception {
-            super.testGetNameInNamespace();
-            Name name = nameParser.parse(firstContext.getNameInNamespace());
-            assertTrue(name.endsWith(nameParser.parse(firstContextName())));
-            name = nameParser.parse(secondContext.getNameInNamespace());
-            assertTrue(name.endsWith(nameParser.parse(secondContextName())));
+        super.testGetNameInNamespace();
+        Name name = nameParser.parse(firstContext.getNameInNamespace());
+        assertTrue(name.endsWith(nameParser.parse(firstContextName())));
+        name = nameParser.parse(secondContext.getNameInNamespace());
+        assertTrue(name.endsWith(nameParser.parse(secondContextName())));
     }
 }

Mime
View raw message