directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitali Baumtrok (Created) (JIRA)" <>
Subject [jira] [Created] (DIRAPI-82) Loading class file as stream under Windows bugged
Date Wed, 22 Feb 2012 14:25:48 GMT
Loading class file as stream under Windows bugged

                 Key: DIRAPI-82
             Project: Directory Client API
          Issue Type: Bug
    Affects Versions: 1.0.0-M10
         Environment: Windows
            Reporter: Vitali Baumtrok

The method Class<?>):
returns zero bytes under Windows if the path to the class contains at least one space character.
This affects the possibility to load stored procedures. No exception is thrown.
For example:
Reading the file "C:\a a\foo.class" would return zero bytes, because
clazz.getResource( classFileName ).getFile()
returns the String "/C:/a%20a/foo.class". So in the following
URL url = clazz.getResource( classFileName );
File file = new File( url.getFile() );
the file can not be found, because it searches for the "C:/a%20a" directory which doesn't
Instead of url.getFile() use url.toURI()

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message