-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSPWIKI-1148 - Avoid File Stream #47
JSPWIKI-1148 - Avoid File Stream #47
Conversation
@@ -141,15 +142,15 @@ public static Properties loadWebAppProps( final ServletContext context ) { | |||
* @return inputstream holding the properties file | |||
* @throws FileNotFoundException properties file not found | |||
*/ | |||
static InputStream loadCustomPropertiesFile( final ServletContext context, final String propertyFile ) throws FileNotFoundException { | |||
static InputStream loadCustomPropertiesFile( final ServletContext context, final String propertyFile ) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juanpablo-santos
Special careful here. Signature changed.
0f216fc
to
967b3a2
Compare
@juanpablo-santos ping here ;) |
Hi @arturobernalg , apologies for the long delay looking at this PR. I'm +1 on merging it, however, would you mind pls rebasing with latest commits? As for the signature change, that method is package-protected and seems to be used only by the best regards, |
967b3a2
to
5a20a0e
Compare
HI @juanpablo-santos , rebase from master. I think all the changes are already made previously. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Replace construction of FileInputStream and FileOutputStream objects with Files NIO APIs.
Please note, that the java.nio API does not throw a FileNotFoundException anymore, instead it throws a NoSuchFileException.
https://github.com/apache/jspwiki/blob/master/jspwiki-util/src/main/java/org/apache/wiki/util/PropertyReader.java#L144