From 020b6a6a97b38afca9870f11c963de7df906e6d7 Mon Sep 17 00:00:00 2001 From: mnhock Date: Tue, 23 Jan 2024 18:26:06 +0100 Subject: [PATCH 1/2] Simplify annotation See gh-917 --- .../restdocs/testfixtures/SnippetConditions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java index 9bd3db02..01170cf8 100644 --- a/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java +++ b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java @@ -81,7 +81,7 @@ public final class SnippetConditions { new MarkdownCodeBlockCondition<>("http"), 2); } - @SuppressWarnings({ "rawtypes" }) + @SuppressWarnings("rawtypes") public static CodeBlockCondition codeBlock(TemplateFormat format, String language) { if ("adoc".equals(format.getFileExtension())) { return new AsciidoctorCodeBlockCondition(language, null); @@ -89,7 +89,7 @@ public final class SnippetConditions { return new MarkdownCodeBlockCondition(language); } - @SuppressWarnings({ "rawtypes" }) + @SuppressWarnings("rawtypes") public static CodeBlockCondition codeBlock(TemplateFormat format, String language, String options) { if ("adoc".equals(format.getFileExtension())) { return new AsciidoctorCodeBlockCondition(language, options); From 1fea2151e226379b5163dfd3ead532a3af7ab4d9 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 24 Jan 2024 14:14:48 +0000 Subject: [PATCH 2/2] Polish "Simplify annotation" See gh-917 --- .../restdocs/testfixtures/SnippetConditions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java index 01170cf8..ec20b374 100644 --- a/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java +++ b/spring-restdocs-core/src/testFixtures/java/org/springframework/restdocs/testfixtures/SnippetConditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2021 the original author or authors. + * Copyright 2014-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.