org.linkedin.util-core/src/main/java/org/linkedin/util/io/PathUtils.java
public static String addPaths(String path1, String path2)
  {
    if(path1.endsWith("/"))
    {
      if(path2.startsWith("/"))
        return path1.substring(0, path1.length() - 1) + path2;
      else
        return path1 + path2;
    }
    else
    {
      if(path2.startsWith("/"))
        return path1 + path2;
      else
        return path1 + "/" + path2;
    }
  }
public static String addPaths(String path1, String path2)
  {
    if(path1.endsWith("/"))
    {
      if(path2.startsWith("/"))
        return path1.substring(0, path1.length() - 1) + path2;
      else
        return path1 + path2;
    }
    else
    {
      if(path2.startsWith("/"))
        return path1 + path2;
      else
        return path1 + "/" + path2;
    }
  }
Adds 2 paths taking into consideration the /

@param path1
@param path2
@return path1 + path2