void () { long start = System.currentTimeMillis(); Set<String> thm = new HashSet<>(); Set<CharSequence> uniq = Collections.newSetFromMap(new IdentityHashMap<>()); FilePathInterner interner = new FilePathInterner(); FileUtil.processFilesRecursively(new File(PathManagerEx.getTestDataPath()), file -> { String s = FileUtil.toSystemIndependentName(file.getPath()); if (!thm.add(s) || !thm.contains(s)) { throw new AssertionError(s); } CharSequence interned = interner.intern(s); boolean added = uniq.add(interned); assertTrue(s, added); assertEquals(s, interned.toString(), s); assertEquals(s, interned.hashCode(), s.hashCode()); return true; }); LOG.debug("done in " + (System.currentTimeMillis() - start)/1000 + "s; size="+uniq.size()); checkInterner(thm, interner, uniq); checkInterner2(thm, interner, uniq); }