Skip to content

Commit

Permalink
Issue checkstyle#614: Suppress all Idea Inspection violations
Browse files Browse the repository at this point in the history
  • Loading branch information
nrmancuso committed Aug 28, 2022
1 parent 007b03c commit 9e5caa6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ public void publish() throws IOException {
*/
private static int getPostsCount() throws IOException {
final HttpURLConnection conn = (HttpURLConnection) new URL(POST_URL).openConnection();
final BufferedReader br = new BufferedReader(
new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
final Matcher matcher = NUMBER_PATTERN.matcher(br.readLine());
final Matcher matcher;
try (BufferedReader br = new BufferedReader(
new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8))) {
matcher = NUMBER_PATTERN.matcher(br.readLine());
}
int count = -1;
if (matcher.find()) {
count = Integer.parseInt(matcher.group());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public static void generateWithFreemarker(Map<String, Object> variables, String
* @return The contents of the template.
* @throws FileNotFoundException if the supplied file can't be found.
* @throws IllegalStateException if the resource can't be found.
* @noinspection IOStreamConstructor
*/
private static String loadTemplate(String fileName, String defaultResource)
throws FileNotFoundException {
Expand Down

0 comments on commit 9e5caa6

Please sign in to comment.