Skip to content

Commit f3e188a

Browse files
committed
[MPMD-361] Explicitly start and end tables with Doxia Sinks in report renderers
1 parent b65c7a6 commit f3e188a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main/java/org/apache/maven/plugins/pmd/CpdReportGenerator.java

+2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public void generate( List<Duplication> duplications )
165165
String code = duplication.getCodefragment();
166166

167167
sink.table();
168+
sink.tableRows( null, false );
168169
sink.tableRow();
169170
sink.tableHeaderCell();
170171
sink.text( bundle.getString( "report.cpd.column.file" ) );
@@ -201,6 +202,7 @@ public void generate( List<Duplication> duplications )
201202
sink.verbatim_();
202203
sink.rawText( "</td>" );
203204
sink.tableRow_();
205+
sink.tableRows_();
204206
sink.table_();
205207
}
206208

src/main/java/org/apache/maven/plugins/pmd/PmdReportGenerator.java

+6
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ private void startFileSection( int level, String currentFilename, PmdFileInfo fi
166166
sink.sectionTitle_( level );
167167

168168
sink.table();
169+
sink.tableRows( null, false );
169170
sink.tableRow();
170171
sink.tableHeaderCell();
171172
sink.text( bundle.getString( "report.pmd.column.rule" ) );
@@ -187,6 +188,7 @@ private void startFileSection( int level, String currentFilename, PmdFileInfo fi
187188

188189
private void endFileSection( int level )
189190
{
191+
sink.tableRows_();
190192
sink.table_();
191193
sink.section_( level );
192194
}
@@ -406,6 +408,7 @@ public int compare( SuppressedViolation o1, SuppressedViolation o2 )
406408
} );
407409

408410
sink.table();
411+
sink.tableRows( null, false );
409412
sink.tableRow();
410413
sink.tableHeaderCell();
411414
sink.text( bundle.getString( "report.pmd.suppressedViolations.column.filename" ) );
@@ -448,6 +451,7 @@ public int compare( SuppressedViolation o1, SuppressedViolation o2 )
448451
sink.tableRow_();
449452
}
450453

454+
sink.tableRows_();
451455
sink.table_();
452456
sink.section1_();
453457
}
@@ -471,6 +475,7 @@ public int compare( ProcessingError e1, ProcessingError e2 )
471475
sink.sectionTitle1_();
472476

473477
sink.table();
478+
sink.tableRows( null, false );
474479
sink.tableRow();
475480
sink.tableHeaderCell();
476481
sink.text( bundle.getString( "report.pmd.processingErrors.column.filename" ) );
@@ -485,6 +490,7 @@ public int compare( ProcessingError e1, ProcessingError e2 )
485490
processSingleProcessingError( error );
486491
}
487492

493+
sink.tableRows_();
488494
sink.table_();
489495

490496
sink.section1_();

0 commit comments

Comments
 (0)