String (@NotNull String path, Set<? super String> names) { String pathComponent = getLastPathComponent(path); if (pathComponent != null && names != null && !names.add(pathComponent)) { return path; } else { return pathComponent == null ? path : pathComponent; } }