|
|
@ -650,11 +650,8 @@ public class AmazonS3 { |
|
|
|
static Properties properties(final File authFile) |
|
|
|
static Properties properties(final File authFile) |
|
|
|
throws FileNotFoundException, IOException { |
|
|
|
throws FileNotFoundException, IOException { |
|
|
|
final Properties p = new Properties(); |
|
|
|
final Properties p = new Properties(); |
|
|
|
final FileInputStream in = new FileInputStream(authFile); |
|
|
|
try (FileInputStream in = new FileInputStream(authFile)) { |
|
|
|
try { |
|
|
|
|
|
|
|
p.load(in); |
|
|
|
p.load(in); |
|
|
|
} finally { |
|
|
|
|
|
|
|
in.close(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return p; |
|
|
|
return p; |
|
|
|
} |
|
|
|
} |
|
|
@ -697,16 +694,13 @@ public class AmazonS3 { |
|
|
|
throw new IOException(JGitText.get().noXMLParserAvailable); |
|
|
|
throw new IOException(JGitText.get().noXMLParserAvailable); |
|
|
|
} |
|
|
|
} |
|
|
|
xr.setContentHandler(this); |
|
|
|
xr.setContentHandler(this); |
|
|
|
final InputStream in = c.getInputStream(); |
|
|
|
try (InputStream in = c.getInputStream()) { |
|
|
|
try { |
|
|
|
|
|
|
|
xr.parse(new InputSource(in)); |
|
|
|
xr.parse(new InputSource(in)); |
|
|
|
} catch (SAXException parsingError) { |
|
|
|
} catch (SAXException parsingError) { |
|
|
|
throw new IOException( |
|
|
|
throw new IOException( |
|
|
|
MessageFormat.format( |
|
|
|
MessageFormat.format( |
|
|
|
JGitText.get().errorListing, prefix), |
|
|
|
JGitText.get().errorListing, prefix), |
|
|
|
parsingError); |
|
|
|
parsingError); |
|
|
|
} finally { |
|
|
|
|
|
|
|
in.close(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|