Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.codehaus.plexus.mailsender.MailSenderException;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;

/**
* Goal which sends an announcement through email.
Expand Down Expand Up @@ -366,7 +365,7 @@ protected String readAnnouncement( File file )
{
try
{
if ( StringUtils.isEmpty( templateEncoding ) )
if ( templateEncoding == null || templateEncoding.isEmpty() )
{
templateEncoding = ReaderFactory.FILE_ENCODING;
getLog().warn( "File encoding has not been set, using platform encoding '" + templateEncoding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.tools.ToolManager;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.velocity.VelocityComponent;

/**
Expand Down Expand Up @@ -696,7 +695,7 @@ public void processTemplate( Context context, File outputDirectory, String templ
File f;

// Use the name of the template as a default value
if ( StringUtils.isEmpty( announcementFile ) )
if ( announcementFile == null || announcementFile.isEmpty() )
{
announcementFile = template;
}
Expand All @@ -714,7 +713,7 @@ public void processTemplate( Context context, File outputDirectory, String templ

engine.setApplicationAttribute( "baseDirectory", basedir );

if ( StringUtils.isEmpty( templateEncoding ) )
if ( templateEncoding == null || templateEncoding.isEmpty() )
{
templateEncoding = ReaderFactory.FILE_ENCODING;
getLog().warn( "File encoding has not been set, using platform encoding " + templateEncoding
Expand Down Expand Up @@ -804,7 +803,7 @@ protected List<Release> getJiraReleases()

List<Issue> issueList = jiraDownloader.getIssueList();

if ( StringUtils.isNotEmpty( versionPrefix ) )
if ( versionPrefix != null && !versionPrefix.isEmpty() )
{
int originalNumberOfIssues = issueList.size();
issueList = IssueUtils.filterIssuesWithVersionPrefix( issueList, versionPrefix );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import org.apache.maven.shared.filtering.MavenFileFilterRequest;
import org.apache.maven.shared.filtering.MavenFilteringException;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.StringUtils;

/**
* Goal which creates a nicely formatted Changes Report in html format from a changes.xml file.
Expand Down Expand Up @@ -334,14 +333,14 @@ public void executeReport( Locale locale )

report.setAddActionDate( addActionDate );

if ( StringUtils.isEmpty( url ) )
if ( url == null || url.isEmpty() )
{
getLog().warn( "No issue management URL defined in POM. Links to your issues will not work correctly." );
}

boolean feedGenerated = false;

if ( StringUtils.isNotEmpty( feedType ) )
if ( feedType != null && !feedType.isEmpty() )
{
feedGenerated = generateFeed( changesXml, locale );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.SinkEventAttributes;
import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
import org.codehaus.plexus.util.StringUtils;

import java.util.ResourceBundle;

Expand Down Expand Up @@ -80,7 +79,7 @@ protected void sinkBeginReport( Sink sink, ResourceBundle bundle )
sink.text( title );
sink.title_();

if ( StringUtils.isNotEmpty( author ) )
if ( author != null && !author.isEmpty() )
{
sink.author();
sink.text( author );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
import org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory;
import org.codehaus.plexus.util.StringUtils;

import java.net.MalformedURLException;
import java.net.URL;
Expand Down Expand Up @@ -123,7 +122,7 @@ public List<Issue> getIssueList()
// Fetch issues
String qstr = "";

if ( !StringUtils.isEmpty( query ) )
if ( !( query == null || query.isEmpty() ) )
{
qstr = query;
}
Expand Down