Hi,
I am Madhawa, a recent graduate from Department of Computer Science and
Engineering, University of Moratuwa, Sri Lanka. I am new to Apache OODT and
I thought of starting off with the file manager module. However, from the
very beginning, I had trouble due to space characters in paths and I am
interested in fixing these issues.

I already fixed a space character related issue [1] on the start script of
filemgr, which is now merged. Afterward, I realized that when the
repository path contains space characters, ingest operations fail. After
observing the code, I identified that this error occurs because the
method *File.toURL
(which is now deprecated) fails to automatically escape illegal characters
in paths*. This deprecated method is used in multiple places of the
codebase and I raised the issue [2] mentioning this situation.

As a solution to the above issue, JAVADOC [3] recommends to first convert
the File to a URI (using File.toURI() method) and then convert the URI to a
URL (using URI.toURL() method). *Before going forward, since this code
change affects multiple areas of the code, I would like to know suggestions
and comments from the community on this approach.*

My plan is to clone the project to a path with space characters and run
unit tests to validate the fix. However, it seems this approach is not so
trivial since some of the unit tests are written under the assumption that
space characters would not appear in paths. Therefore, *we may have to
modify those unit tests as well. *

I would like to know your opinion on above-mentioned approaches to fix the
issue and modify the unit tests

[1] - https://issues.apache.org/jira/projects/OODT/issues/OODT-998
[2] - https://issues.apache.org/jira/projects/OODT/issues/OODT-999
[3] - https://docs.oracle.com/javase/7/docs/api/java/io/File.html#toURL()

Kind Regards

*Madhawa Vidanapathirana*
Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka

Mobile: (+94) 716874425
Email: madhawavidanapathir...@gmail.com
Linked-In: *https://www.linkedin.com/in/madhawav/
<https://www.linkedin.com/in/madhawav/>*

Reply via email to