Skip to content

Commit 9bf18e6

Browse files
committed
Issue #614: Suppress all Idea Inspection violations
1 parent f1f3c45 commit 9bf18e6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

releasenotes-builder/src/main/java/com/github/checkstyle/publishers/SourceforgeRssPublisher.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ public void publish() throws IOException {
108108
*/
109109
private static int getPostsCount() throws IOException {
110110
final HttpURLConnection conn = (HttpURLConnection) new URL(POST_URL).openConnection();
111-
final BufferedReader br = new BufferedReader(
112-
new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
113-
final Matcher matcher = NUMBER_PATTERN.matcher(br.readLine());
111+
final Matcher matcher;
112+
try (BufferedReader br = new BufferedReader(
113+
new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8))) {
114+
matcher = NUMBER_PATTERN.matcher(br.readLine());
115+
}
114116
int count = -1;
115117
if (matcher.find()) {
116118
count = Integer.parseInt(matcher.group());

releasenotes-builder/src/main/java/com/github/checkstyle/templates/TemplateProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public static void generateWithFreemarker(Map<String, Object> variables, String
9999
* @return The contents of the template.
100100
* @throws FileNotFoundException if the supplied file can't be found.
101101
* @throws IllegalStateException if the resource can't be found.
102+
* @noinspection IOStreamConstructor
102103
*/
103104
private static String loadTemplate(String fileName, String defaultResource)
104105
throws FileNotFoundException {

0 commit comments

Comments
 (0)