Skip to content

Commit

Permalink
[MPIR-398] Non-sense links created for mailing lists when mailto is e…
Browse files Browse the repository at this point in the history
…mpty
  • Loading branch information
michael-o committed Aug 30, 2020
1 parent 392aa9c commit 8abd4d0
Showing 1 changed file with 33 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,43 @@ public void renderBody()
{
List<String> textRow = new ArrayList<>();

// Validate here subsribe/unsubsribe lists and archives?
textRow.add( mailingList.getName() );
if ( StringUtils.isNotEmpty( mailingList.getName() ) )
{
textRow.add( mailingList.getName() );
}
else
{
textRow.add( "-" );
}

textRow.add( createEmailLinkPatternedText( subscribe, mailingList.getSubscribe(), null ) );
if ( StringUtils.isNotEmpty( mailingList.getSubscribe() ) )
{
textRow.add( createEmailLinkPatternedText( subscribe, mailingList.getSubscribe(), null ) );
}
else
{
textRow.add( "-" );
}

textRow.add( createEmailLinkPatternedText( unsubscribe, mailingList.getUnsubscribe(), null ) );
if ( StringUtils.isNotEmpty( mailingList.getUnsubscribe() ) )
{
textRow.add( createEmailLinkPatternedText( unsubscribe, mailingList.getUnsubscribe(), null ) );
}
else
{
textRow.add( "-" );
}

textRow.add( createEmailLinkPatternedText( post, mailingList.getPost(), "-" ) );
if ( StringUtils.isNotEmpty( mailingList.getPost() ) )
{
textRow.add( createEmailLinkPatternedText( post, mailingList.getPost(), null ) );
}
else
{
textRow.add( "-" );
}

if ( mailingList.getArchive() != null && mailingList.getArchive().length() > 0 )
if ( mailingList.getArchive() != null && !mailingList.getArchive().isEmpty() )
{
textRow.add( createLinkPatternedText(
ProjectInfoReportUtils.getArchiveServer( mailingList.getArchive() ),
Expand Down

0 comments on commit 8abd4d0

Please sign in to comment.