Announcement Announcement Module
Collapse
No announcement yet.
Bug in AbstractSitePathUrlFactory ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug in AbstractSitePathUrlFactory ?

    Is there a bug in formatPath? (version 1.1.0.M2?)
    It reads:

    Code:
    	private String formatPath(String path) {
    		String formattedPath = null;
    		if (path != null) {
    			formattedPath = (path.startsWith("/") ? path : "/" + path);
    			formattedPath = (path.endsWith("/") ? path : path + "/");
    		}
    		return formattedPath;
    	}
    shouldn't be?
    Code:
    	private String formatPath(String path) {
    		String formattedPath = null;
    		if (path != null) {
    			formattedPath = (path.startsWith("/") ? path : "/" + path);
    			formattedPath = (path.endsWith("/") ? formattedPath : formattedPath + "/");
    		}
    		return formattedPath;
    	}

  • #2
    Indeed it is. I created a JIRA and have already pushed a fix for this which is available in the latest snapshot.

    Thanks!

    Comment

    Working...
    X