[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: JBoss with spaces in the directory name

alesj do-not-reply at jboss.com
Thu Jul 24 09:12:55 EDT 2008


I still think the path should be decoded asap in the whole execution stack.
Since there might be a few similar cache points to this one I found in FileHandler:

  |    public VirtualFileHandler createChildHandler(String name) throws IOException
  |    {
  |       File parentFile = getFile();
  |       File child = new File(parentFile, name);
  |       VirtualFileHandler handler = childCache.get(name);
  |       // if a child has already been created use that
  |       // if the child has been modified on disk then create a new handler
  |       if (handler != null && handler.hasBeenModified())
  |       {
  |          handler = null;
  |       }
  |       if (handler == null)
  |       {
  |          FileSystemContext context = getVFSContext();
  |          handler = context.createVirtualFileHandler(this, child);
  |          if (handler != null)
  |             childCache.put(name, handler);
  |       }
  |       return handler;
  |    }
  | 
e.g. if the name once comes with %20 and the 2nd time w/o, then we'll have two entries for the same file.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166419#4166419

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166419



More information about the jboss-dev-forums mailing list