afs commented on code in PR #2310:
URL: https://github.com/apache/jena/pull/2310#discussion_r1515134034
##########
jena-arq/src/main/java/org/apache/jena/query/ResultSetFactory.java:
##########
@@ -65,12 +66,12 @@ public static ResultSet load(String filenameOrURI) {
* @param format
* @return ResultSet
*/
-
public static ResultSet load(String filenameOrURI, ResultsFormat format) {
if (format == null)
format = ResultsFormat.guessSyntax(filenameOrURI);
- InputStream in = IO.openFile(filenameOrURI) ;
- return load(in, format) ;
+ try ( InputStream in = IO.openFile(filenameOrURI) ) {
+ return load(in, format) ;
Review Comment:
Good point - it may do. (I think I was accidentally relying on the large
amount of buffering there is inside so of the I/O code.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]