Source:
protected Map<RepositoryFileAttributeType, Object> getRepositoryFileAttributes(RepositoryPath repositoryPath, RepositoryFileAttributeType... attributeTypes) throws IOException { if (attributeTypes == null || attributeTypes.length == 0) { return Collections.emptyMap(); } Map<RepositoryFileAttributeType, Object> result = new HashMap<>(); for (RepositoryFileAttributeType repositoryFileAttributeType : attributeTypes) { Object value; switch (repositoryFileAttributeType) { default: Map<RepositoryFileAttributeType, Object> attributesLocal; value = null; break; case CHECKSUM: value = isChecksum(repositoryPath); break; case TEMP: value = repositoryPath.isAbsolute() && repositoryPath.startsWith(repositoryPath.getFileSystem() .getRootDirectory() .resolve(LayoutFileSystem.TEMP)); break; case TRASH: value = repositoryPath.isAbsolute() && repositoryPath.startsWith(repositoryPath.getFileSystem() .getRootDirectory() .resolve(LayoutFileSystem.TRASH)); break; case METADATA: value = isArtifactMetadata(repositoryPath); break; case ARTIFACT: attributesLocal = getRepositoryFileAttributes(repositoryPath, RepositoryFileAttributeType.CHECKSUM); boolean isChecksum = Boolean.TRUE.equals(attributesLocal.get(RepositoryFileAttributeType.CHECKSUM)); boolean isDirectory = Files.isDirectory(repositoryPath); value = !isChecksum && !isDirectory; break; case COORDINATES: attributesLocal = getRepositoryFileAttributes(repositoryPath, RepositoryFileAttributeType.ARTIFACT); boolean isArtifact = Boolean.TRUE.equals(attributesLocal.get(RepositoryFileAttributeType.ARTIFACT)); value = isArtifact ? getArtifactCoordinates(repositoryPath) : null; break; case RESOURCE_URL: value = resolveResource(repositoryPath); break; case ARTIFACT_PATH: value = RepositoryFiles.relativizePath(repositoryPath); break; case STORAGE_ID: value = repositoryPath.getRepository().getStorage().getId(); break; case REPOSITORY_ID: value = repositoryPath.getRepository().getId(); break; case EXPIRED: value = false; break; case REQUIRES_GROUP_AGGREGATION: value = false; break; } if (value != null) { result.put(repositoryFileAttributeType, value); } } return result; }

Target:
protected Map<RepositoryFileAttributeType, Object> getRepositoryFileAttributes(RepositoryPath repositoryPath, RepositoryFileAttributeType... attributeTypes) throws IOException { if (attributeTypes == null || attributeTypes.length == 0) { return Collections.emptyMap(); } Map<RepositoryFileAttributeType, Object> result = new HashMap<>(); for (RepositoryFileAttributeType repositoryFileAttributeType : attributeTypes) { Object value; switch (repositoryFileAttributeType) { default: Map<RepositoryFileAttributeType, Object> attributesLocal; value = null; break; case CHECKSUM: value = isChecksum(repositoryPath); break; case TEMP: value = repositoryPath.isAbsolute() && repositoryPath.startsWith(repositoryPath.getFileSystem() .getRootDirectory() .resolve(LayoutFileSystem.TEMP)); break; case TRASH: value = repositoryPath.isAbsolute() && repositoryPath.startsWith(repositoryPath.getFileSystem() .getRootDirectory() .resolve(LayoutFileSystem.TRASH)); break; case METADATA: value = isArtifactMetadata(repositoryPath); break; case ARTIFACT: attributesLocal = getRepositoryFileAttributes(repositoryPath, RepositoryFileAttributeType.CHECKSUM); boolean isChecksum = Boolean.TRUE.equals(attributesLocal.get(RepositoryFileAttributeType.CHECKSUM)); boolean isDirectory = Files.isDirectory(repositoryPath); value = !isChecksum && !isDirectory; break; case COORDINATES: attributesLocal = getRepositoryFileAttributes(repositoryPath, RepositoryFileAttributeType.ARTIFACT); boolean isArtifact = Boolean.TRUE.equals(attributesLocal.get(RepositoryFileAttributeType.ARTIFACT)); value = isArtifact ? getArtifactCoordinates(repositoryPath) : null; break; case RESOURCE_URL: value = resolveResource(repositoryPath); break; case ARTIFACT_PATH: value = RepositoryFiles.relativizePath(repositoryPath); break; case STORAGE_ID: value = repositoryPath.getRepository().getStorage().getId(); break; case REPOSITORY_ID: value = repositoryPath.getRepository().getId(); break; case EXPIRED: value = false; break; } if (value != null) { result.put(repositoryFileAttributeType, value); } } return result; }