[udig-devel] [jira] Created: (UDIG-759) ProjectRegistryImpl#findProject using .equals

Jesse Eichar (JIRA) jira at codehaus.org
Wed May 10 09:21:41 PDT 2006


ProjectRegistryImpl#findProject using .equals
---------------------------------------------

         Key: UDIG-759
         URL: http://jira.codehaus.org/browse/UDIG-759
     Project: uDIG
        Type: Bug

  Components: API project  
    Versions: UDIG 1.1.M8    
    Reporter: Jesse Eichar
 Assigned to: Jesse Eichar 


I have finally tracked down my strange bug with it adding a duplicate project.
It came down to the line:
 
Project project = ProjectRegistryImpl.getProjectRegistry().getProject(projectURI);  
This was actually reloading the project because the ProjectRegistryImpl method findProject(URI uri), was doing a test using the URI equals method, which it was failing.
The URIs it was testing where:
 
projectURI=file:/D:/Eclipse/runtime-workspace/project.udig/project.uprj - my one
NextURI = file://D:\Eclipse\runtime-workspace\project.udig\project.uprj - the one it already had
 As you can see, they are the same project, but the paths have different slashes.
 
I am not sure why, when I rebuild the URI it is coming out differently.
I would have thought that the URI equals test should test that actual path components and so find them equal.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the udig-devel mailing list