From f3e188aed9812c38655b7c42ae5620f1d18705ab Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Fri, 6 Jan 2023 22:52:57 +0100 Subject: [PATCH] [MPMD-361] Explicitly start and end tables with Doxia Sinks in report renderers --- .../org/apache/maven/plugins/pmd/CpdReportGenerator.java | 2 ++ .../org/apache/maven/plugins/pmd/PmdReportGenerator.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java b/src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java index 34a07029..18230556 100644 --- a/src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java +++ b/src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java @@ -165,6 +165,7 @@ public void generate( List duplications ) String code = duplication.getCodefragment(); sink.table(); + sink.tableRows( null, false ); sink.tableRow(); sink.tableHeaderCell(); sink.text( bundle.getString( "report.cpd.column.file" ) ); @@ -201,6 +202,7 @@ public void generate( List duplications ) sink.verbatim_(); sink.rawText( "" ); sink.tableRow_(); + sink.tableRows_(); sink.table_(); } diff --git a/src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java b/src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java index e266cb56..623b7c94 100644 --- a/src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java +++ b/src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java @@ -166,6 +166,7 @@ private void startFileSection( int level, String currentFilename, PmdFileInfo fi sink.sectionTitle_( level ); sink.table(); + sink.tableRows( null, false ); sink.tableRow(); sink.tableHeaderCell(); sink.text( bundle.getString( "report.pmd.column.rule" ) ); @@ -187,6 +188,7 @@ private void startFileSection( int level, String currentFilename, PmdFileInfo fi private void endFileSection( int level ) { + sink.tableRows_(); sink.table_(); sink.section_( level ); } @@ -406,6 +408,7 @@ public int compare( SuppressedViolation o1, SuppressedViolation o2 ) } ); sink.table(); + sink.tableRows( null, false ); sink.tableRow(); sink.tableHeaderCell(); sink.text( bundle.getString( "report.pmd.suppressedViolations.column.filename" ) ); @@ -448,6 +451,7 @@ public int compare( SuppressedViolation o1, SuppressedViolation o2 ) sink.tableRow_(); } + sink.tableRows_(); sink.table_(); sink.section1_(); } @@ -471,6 +475,7 @@ public int compare( ProcessingError e1, ProcessingError e2 ) sink.sectionTitle1_(); sink.table(); + sink.tableRows( null, false ); sink.tableRow(); sink.tableHeaderCell(); sink.text( bundle.getString( "report.pmd.processingErrors.column.filename" ) ); @@ -485,6 +490,7 @@ public int compare( ProcessingError e1, ProcessingError e2 ) processSingleProcessingError( error ); } + sink.tableRows_(); sink.table_(); sink.section1_();