File tree Expand file tree Collapse file tree
com.avaloq.tools.ddk/src/com/avaloq/tools/ddk Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*******************************************************************************
2+ * Copyright (c) 2026 Avaloq Group AG
3+ *
4+ * MOCK FILE — DO NOT MERGE.
5+ * Introduces 1 PMD + 1 Checkstyle + 1 SpotBugs violation each to validate that the
6+ * static-analysis job's Python annotation step renders inline PR annotations.
7+ * This file MUST be reverted before this PR is marked ready for review.
8+ *******************************************************************************/
9+ package com .avaloq .tools .ddk ;
10+
11+ @ SuppressWarnings ("PMD.SystemPrintln" )
12+ public class MockViolations {
13+
14+ // PMD: EmptyCatchBlock — empty catch block (errorprone.xml category, in the project ruleset)
15+ public void pmdViolation () {
16+ try {
17+ Class .forName ("Foo" );
18+ } catch (Exception e ) {
19+ }
20+ }
21+
22+ // Checkstyle: EmptyCatchBlock — same body as above; both PMD and Checkstyle should fire on the
23+ // empty catch block. Using a distinct method so the two annotations land on different lines.
24+ public void checkstyleViolation () {
25+ try {
26+ Class .forName ("Bar" );
27+ } catch (Exception e ) {
28+ }
29+ }
30+
31+ // SpotBugs: DM_DEFAULT_ENCODING — String#getBytes() without an explicit charset.
32+ public byte [] spotbugsViolation (final String s ) {
33+ return s .getBytes ();
34+ }
35+
36+ }
You can’t perform that action at this time.
0 commit comments