-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Use getResourceAsStream
for JStyle reload
#13080
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
Conversation
Signed-off-by: subhramit <subhramit.bb@live.in>
URL resUrl = JStyle.class.getResource(path); | ||
if (resUrl != null) { | ||
try (InputStream stream = resUrl.openStream()) { | ||
try (InputStream stream = JStyle.class.getResourceAsStream(path)) { |
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.
The try block covers multiple statements, which is against the guideline to cover as few statements as possible. This can make exception handling less precise.
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.
Maybe a small comment, why styleFile
is not used here, but path
.
The two variables should be put togehter at the declaration above in this file maybe? Maybe, there could be comments added to each variable.
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.
needs to support both internal and extenral style files
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.
The two variables should be put togehter at the declaration above in this file maybe?
Class level variables, used at different places.
Maybe, there could be comments added to each variable.
Done. field-level javadoc should appear on hover.
Signed-off-by: subhramit <subhramit.bb@live.in>
@trag-bot didn't find any issues in the code! ✅✨ |
Follow-up to #13075
Addresses #13075 (comment)
Refs. JabRef#693, #13073
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)