The following comment has been added to this issue:

     Author: Dat Phung
    Created: Sat, 2 Jul 2005 9:09 AM
       Body:
When writing your own SubTask, you would something like this:

        URL url = getClass().getResource(TEMPLATE_FILE);

If your template file happens to be in a classpath that contains spaces, then 
you get the exception.
---------------------------------------------------------------------
View this comment:
  
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1455?page=comments#action_16851

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1455

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-1455
    Summary: FileManager.getURLContent() cannot handle URLs with spaces
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             Core
   Versions:
             1.2.3

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Dat Phung

    Created: Thu, 30 Jun 2005 3:58 PM
    Updated: Sat, 2 Jul 2005 9:09 AM
Environment: JDK 1.4.2_07 on Windows XP

Description:
FileManager.java should be changed to:

  if ("file".equals(url.getProtocol())) {
      is = new java.io.FileInputStream(URLDecode.decode(url.getFile(), "utf8"));
  }
  else {
      is = url.openStream();
  }

i.e. you need to decode the URL otherwise you get a FileNotFoundException when 
the URL contains spaces e.g. c:/Program%20Files/...


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to