You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feel free to close, but this seemed a bit odd in JsonLoader:
finalClosercloser = Closer.create();
finalJsonNoderet;
finalInputStreamin;
try {
in = closer.register(url.openStream());
ret = READER.fromInputStream(in);
} finally {
closer.close();
}
returnret;
}
/** * Read a {@link JsonNode} from an URL. * * @param url The URL to fetch the JSON document from * @return The document at that URL * @throws IOException in case of network problems etc. */publicstaticJsonNodefromURL(finalURLurl)
throwsIOException
{
returnREADER.fromInputStream(url.openStream());
}
This would feel like a better way round:
returnfromURL(url);
}
/** * Read a {@link JsonNode} from an URL. * * @param url The URL to fetch the JSON document from * @return The document at that URL * @throws IOException in case of network problems etc. */publicstaticJsonNodefromURL(finalURLurl)
throwsIOException
{
finalClosercloser = Closer.create();
finalJsonNoderet;
finalInputStreamin;
try {
in = closer.register(url.openStream());
ret = READER.fromInputStream(in);
} finally {
closer.close();
}
returnret;
}
The text was updated successfully, but these errors were encountered:
Feel free to close, but this seemed a bit odd in JsonLoader:
This would feel like a better way round:
The text was updated successfully, but these errors were encountered: