Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 417219

Summary: Folders with square brackets in name don't show up in breadcrumb
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ServerAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 3.0   
Target Milestone: 4.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2013-09-13 15:03:07 EDT
I20130913

If you create a project or folder in Orion that starts with a sequence in square brackets, that project/folder name does not appear in the breadcrumb when editing a file within it. Steps:

1) Create a top level folder called "[bust]me"
2) Create a file a.txt inside this folder
3) Edit the file

-> The breadcrumb shows Orion Content / a.txt 
-> Should be: Orion content / [bust]me / a.txt
Comment 1 John Arthorne CLA 2013-09-13 15:03:59 EDT
There is an associated error in the log:

java.net.URISyntaxException: Illegal character in path at index 2: A/[bork]/
	at java.net.URI$Parser.fail(URI.java:2809)
	at java.net.URI$Parser.checkChars(URI.java:2982)
	at java.net.URI$Parser.parseHierarchical(URI.java:3066)
	at java.net.URI$Parser.parse(URI.java:3024)
	at java.net.URI.<init>(URI.java:807)
	at org.eclipse.orion.internal.server.servlets.workspace.ProjectParentDecorator.addParents(ProjectParentDecorator.java:81)
	at org.eclipse.orion.internal.server.servlets.workspace.ProjectParentDecorator.addAtributesFor(ProjectParentDecorator.java:50)
	at org.eclipse.orion.server.servlets.OrionServlet.decorateResponse(OrionServlet.java:96)
	at org.eclipse.orion.server.servlets.OrionServlet.decorateResponse(OrionServlet.java:80)
	at org.eclipse.orion.internal.server.servlets.file.FileHandlerV1.handleGetMetadata(FileHandlerV1.java:60)
Comment 2 John Arthorne CLA 2013-09-18 16:18:12 EDT
Fix and regression test in the commit below. I made a slight change to our test framework helper methods, which were expecting unencoded URI strings. It is really hard to correctly encode a URI containing square brackets so I changed the methods to expect encoded URI strings. There was one other test impacted that had to change to pass in encoded URI strings.

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=bc62afaaed867921c369cf6214ea402c6ad2fa8a