Example #1
0
 @NotNull
 private static String normalizeRootUrl(
     @NotNull String basePath, @NotNull NewVirtualFileSystem fs) {
   // need to protect against relative path of the form "/x/../y"
   return UriUtil.trimTrailingSlashes(
       fs.getProtocol()
           + URLUtil.SCHEME_SEPARATOR
           + VfsImplUtil.normalize(fs, FileUtil.toCanonicalPath(basePath)));
 }
Example #2
0
 private static HashMap<String, String> getMd5Map(String params) {
   HashMap<String, String> map = new HashMap<String, String>();
   String[] s_map = params.split("&");
   for (int i = 0; i < s_map.length; i++) {
     int index = s_map[i].indexOf("=");
     if (index > 0 && index < s_map[i].length() - 1) {
       map.put(s_map[i].substring(0, index), UriUtil.decode(s_map[i].substring(index + 1)));
     }
   }
   return map;
 }