Skip to content

Commit deeddaa

Browse files
committed
chore(pmd): remove stale suppressions of ImmutableField
Quote from https://pmd.github.io/2018/03/26/PMD-6.2.0/#modified-rules % The Java rule ImmutableField (java-design) now has a new ignoredAnnotations property that allows to configure annotations that imply the method should be ignored. By default several lombok annotations are ignored %
1 parent 4b6361d commit deeddaa

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

src/main/java/ru/mystamps/web/feature/series/HttpURLConnectionDownloaderService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class HttpURLConnectionDownloaderService implements DownloaderService {
4646

4747
// We don't support redirects because they allow to bypass some of our validations.
4848
// FIXME: How exactly redirects can harm?
49-
@SuppressWarnings({"PMD.RedundantFieldInitializer", "PMD.ImmutableField"})
49+
@SuppressWarnings("PMD.RedundantFieldInitializer")
5050
private boolean followRedirects = false;
5151

5252
// Only types listed here will be downloaded. For other types, INVALID_FILE_TYPE error

src/main/java/ru/mystamps/web/feature/series/importing/extractor/JsoupSiteParser.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,7 @@
4040
@Getter(AccessLevel.PROTECTED)
4141
@Setter(AccessLevel.PROTECTED)
4242
@RequiredArgsConstructor(access = AccessLevel.PACKAGE)
43-
@SuppressWarnings({
44-
"PMD.GodClass",
45-
"PMD.TooManyMethods",
46-
// the fields are effectively final but I keep them non-final to simplify testing
47-
"PMD.ImmutableField"
48-
})
43+
@SuppressWarnings({"PMD.GodClass", "PMD.TooManyMethods"})
4944
public class JsoupSiteParser implements SiteParser {
5045
private static final Logger LOG = LoggerFactory.getLogger(JsoupSiteParser.class);
5146

src/main/java/ru/mystamps/web/feature/series/importing/extractor/SiteParserConfiguration.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
@ToString
3131
@EqualsAndHashCode
3232
@RequiredArgsConstructor
33-
// optional fields can't be made final because they have setters
34-
@SuppressWarnings("PMD.ImmutableField")
3533
public class SiteParserConfiguration {
3634
private final String name;
3735
private final String matchedUrl;

0 commit comments

Comments
 (0)