Author: remy.maucherat(a)jboss.com
Date: 2010-03-20 13:05:33 -0400 (Sat, 20 Mar 2010)
New Revision: 1416
Modified:
trunk/java/org/apache/naming/resources/DirContextURLConnection.java
Log:
- connect() may not be using the same path as the other methods.
Modified: trunk/java/org/apache/naming/resources/DirContextURLConnection.java
===================================================================
--- trunk/java/org/apache/naming/resources/DirContextURLConnection.java 2010-03-18
15:36:46 UTC (rev 1415)
+++ trunk/java/org/apache/naming/resources/DirContextURLConnection.java 2010-03-20
17:05:33 UTC (rev 1416)
@@ -115,6 +115,12 @@
*/
protected Permission permission;
+
+ /**
+ * Local path.
+ */
+ protected String localPath;
+
// ------------------------------------------------------------- Properties
@@ -152,6 +158,7 @@
}
}
}
+ localPath = path;
object = context.lookup(path);
attributes = context.getAttributes(path);
if (object instanceof Resource)
@@ -363,7 +370,7 @@
} else {
// Reopen resource
try {
- resource = (Resource) context.lookup(getURL().getFile());
+ resource = (Resource) context.lookup(localPath);
} catch (NamingException e) {
}
}
@@ -404,7 +411,7 @@
if (collection != null) {
try {
- NamingEnumeration enumeration = context.list(getURL().getFile());
+ NamingEnumeration enumeration = context.list(localPath);
while (enumeration.hasMoreElements()) {
NameClassPair ncp = (NameClassPair) enumeration.nextElement();
result.addElement(ncp.getName());
Show replies by date