Set<String> (@NotNull URL resource) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(resource.openStream(), StandardCharsets.UTF_8))) { return new HashSet<>(FileUtil.loadLines(reader)); } catch (IOException ex) { Logger.getInstance(LanguageLevelUtil.class).warn("cannot load: " + resource.getFile(), ex); return Collections.emptySet(); } }