()
| 94 | } |
| 95 | |
| 96 | @Override |
| 97 | public String toString() { |
| 98 | if (fileName != null) { |
| 99 | return fileName; |
| 100 | } else if (pathHint != null) { |
| 101 | return pathHint.getFileName().toString(); |
| 102 | } else if (hash != null && hash.length >= 8) { |
| 103 | return Long.toUnsignedString((hash[0] & 0xffL) << 56 | (hash[1] & 0xffL) << 48 | (hash[2] & 0xffL) << 40 | (hash[3] & 0xffL) << 32 |
| 104 | | (hash[4] & 0xffL) << 24 | (hash[5] & 0xffL) << 16 | (hash[6] & 0xffL) << 8 | hash[7] & 0xffL, 16); |
| 105 | } else { |
| 106 | return "unknown"; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | private static String getSanitizedFileName(Path path) { |
| 111 | return path.getFileName().toString().replace('\n', ' '); |
no outgoing calls
no test coverage detected