Set<String> () { try { // stop words InputStream stream = ResourceUtil.getResourceAsStream(SearchableOptionsRegistrarImpl.class.getClassLoader(), "search", "ignore.txt"); if (stream == null) { throw new IOException("Broken installation: IDE does not provide /search/ignore.txt"); } Set<String> result = new HashSet<>(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8))) { String line; while ((line = reader.readLine()) != null) { if (!line.isEmpty()) { result.add(line); } } } return result; } catch (IOException e) { LOG.error(e); return Collections.emptySet(); } }