@Test public void getRepository_dosFormat() { assertEquals("/c:/", GfsUriUtils.getRepository(URI.create("gfs:/c:/"))); assertEquals("/c:/windows/path", GfsUriUtils.getRepository(URI.create("gfs:/c:/windows/path"))); assertEquals("/c:/windows/path", GfsUriUtils.getRepository(URI.create("gfs:/c:/windows/path/"))); assertEquals("/c:/windows/path", GfsUriUtils.getRepository(URI.create("gfs:/c:/windows/path#/a.txt"))); }
@Nonnull public static String getRepository(URI uri) { checkScheme(uri); String path = uri.getPath(); if(path.length() > 1 && path.endsWith("/") && !path.endsWith(":/")) path = path.substring(0, path.length() - 1); return path; }
GfsUriUtils { @Nonnull public static String getRepository(URI uri) { checkScheme(uri); String path = uri.getPath(); if(path.length() > 1 && path.endsWith("/") && !path.endsWith(":/")) path = path.substring(0, path.length() - 1); return path; } }
GfsUriUtils { @Nonnull public static String getRepository(URI uri) { checkScheme(uri); String path = uri.getPath(); if(path.length() > 1 && path.endsWith("/") && !path.endsWith(":/")) path = path.substring(0, path.length() - 1); return path; }  }
GfsUriUtils { @Nonnull public static String getRepository(URI uri) { checkScheme(uri); String path = uri.getPath(); if(path.length() > 1 && path.endsWith("/") && !path.endsWith(":/")) path = path.substring(0, path.length() - 1); return path; }  @Nonnull static String getRepository(URI uri); @Nonnull static String getFile(URI uri); @Nonnull static Map<String, String> parseQuery(@Nullable String query, @Nullable Set<String> keys); @Nullable static String getSession(URI uri); }
GfsUriUtils { @Nonnull public static String getRepository(URI uri) { checkScheme(uri); String path = uri.getPath(); if(path.length() > 1 && path.endsWith("/") && !path.endsWith(":/")) path = path.substring(0, path.length() - 1); return path; }  @Nonnull static String getRepository(URI uri); @Nonnull static String getFile(URI uri); @Nonnull static Map<String, String> parseQuery(@Nullable String query, @Nullable Set<String> keys); @Nullable static String getSession(URI uri); final static String SID_KEY; }