in src/main/java/org/apache/geronimo/microprofile/impl/jwtauth/jwt/KidMapper.java [102:125]
private String tryLoad(final String value) {
// try external file
final File file = new File(value);
if (file.exists()) {
try {
return Files.readAllLines(file.toPath()).stream().collect(joining("\n"));
} catch (final IOException e) {
throw new IllegalArgumentException(e);
}
}
// if not found try classpath resource
try (final InputStream stream = Thread.currentThread().getContextClassLoader()
.getResourceAsStream(value)) {
if (stream != null) {
return new BufferedReader(new InputStreamReader(stream)).lines().collect(joining("\n"));
}
} catch (final IOException e) {
throw new IllegalArgumentException(e);
}
// else direct value
return value;
}