You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2014/04/10 20:48:13 UTC
svn commit: r1586409 - in
/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin:
changes/ issues/ jira/
Author: dennisl
Date: Thu Apr 10 18:48:13 2014
New Revision: 1586409
URL: http://svn.apache.org/r1586409
Log:
Fix errors reported by Checkstyle.
Modified:
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueManagementSystem.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AdaptiveJiraDownloader.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/RestJiraDownloader.java
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java?rev=1586409&r1=1586408&r2=1586409&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java Thu Apr 10 18:48:13 2014
@@ -257,7 +257,10 @@ public class ChangesMojo
additionalProperties.put( "publishDate", simpleDateFormat.format( now ) );
ChangesXML changesXml = getChangesFromFile( xmlPath, project, additionalProperties );
- if ( changesXml == null ) return;
+ if ( changesXml == null )
+ {
+ return;
+ }
if ( aggregated )
{
@@ -278,7 +281,8 @@ public class ChangesMojo
final ChangesXML childXml = getChangesFromFile( changesFile, childProject, additionalProperties );
if ( childXml != null )
{
- releaseList = releaseUtils.mergeReleases( releaseList, childProject.getName(), childXml.getReleaseList() );
+ releaseList = releaseUtils.mergeReleases( releaseList, childProject.getName(),
+ childXml.getReleaseList() );
}
}
changesXml.setReleaseList( releaseList );
@@ -405,11 +409,12 @@ public class ChangesMojo
// so we get encoding from the file itself
xmlStreamReader = new XmlStreamReader( changesXml );
String encoding = xmlStreamReader.getEncoding();
- File resultFile = new File( filteredOutputDirectory, project.getGroupId() + "." + project.getArtifactId() + "-changes.xml" );
+ File resultFile = new File( filteredOutputDirectory,
+ project.getGroupId() + "." + project.getArtifactId() + "-changes.xml" );
final MavenFileFilterRequest mavenFileFilterRequest =
- new MavenFileFilterRequest( changesXml, resultFile, true, project, Collections.EMPTY_LIST, false,
- encoding, session, additionalProperties );
+ new MavenFileFilterRequest( changesXml, resultFile, true, project, Collections.EMPTY_LIST,
+ false, encoding, session, additionalProperties );
mavenFileFilter.copyFile( mavenFileFilterRequest );
changesXml = resultFile;
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java?rev=1586409&r1=1586408&r2=1586409&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java Thu Apr 10 18:48:13 2014
@@ -21,7 +21,6 @@ package org.apache.maven.plugin.changes;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Iterator;
import java.util.List;
import org.apache.maven.plugin.MojoExecutionException;
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java?rev=1586409&r1=1586408&r2=1586409&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java Thu Apr 10 18:48:13 2014
@@ -252,7 +252,8 @@ public class Issue
this.version = version;
}
- public String toString() {
+ public String toString()
+ {
return this.getClass().getSimpleName()
+ "[id='" + this.getId() + "'"
+ ", title='" + this.getTitle() + "'"
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueManagementSystem.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueManagementSystem.java?rev=1586409&r1=1586408&r2=1586409&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueManagementSystem.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueManagementSystem.java Thu Apr 10 18:48:13 2014
@@ -40,14 +40,14 @@ public interface IssueManagementSystem
*
* @return The map from keys used in poms and other config files to issue types.
*/
- public abstract Map<String, IssueType> getIssueTypeMap();
+ abstract Map<String, IssueType> getIssueTypeMap();
/**
* Get the name of the issue management system.
*
* @return The name of the IMS.
*/
- public abstract String getName();
+ abstract String getName();
/**
* Configure this issue management system.
@@ -55,7 +55,7 @@ public interface IssueManagementSystem
* @param issueTypes The mapping of issue types used in this issue management system to the ones used in a changes.xml file
* @throws MojoExecutionException If the configuration fails
*/
- public abstract void applyConfiguration( Map<String, String> issueTypes )
+ abstract void applyConfiguration( Map<String, String> issueTypes )
throws MojoExecutionException;
}
\ No newline at end of file
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AdaptiveJiraDownloader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AdaptiveJiraDownloader.java?rev=1586409&r1=1586408&r2=1586409&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AdaptiveJiraDownloader.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AdaptiveJiraDownloader.java Thu Apr 10 18:48:13 2014
@@ -1,3 +1,5 @@
+package org.apache.maven.plugin.jira;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,8 +19,6 @@
* under the License.
*/
-package org.apache.maven.plugin.jira;
-
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.issues.Issue;
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java?rev=1586409&r1=1586408&r2=1586409&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/ClassicJiraDownloader.java Thu Apr 10 18:48:13 2014
@@ -34,7 +34,6 @@ import org.apache.commons.httpclient.met
import org.apache.commons.httpclient.params.HttpClientParams;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.issues.Issue;
-import org.apache.maven.settings.Proxy;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/RestJiraDownloader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/RestJiraDownloader.java?rev=1586409&r1=1586408&r2=1586409&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/RestJiraDownloader.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/RestJiraDownloader.java Thu Apr 10 18:48:13 2014
@@ -1,3 +1,5 @@
+package org.apache.maven.plugin.jira;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,8 +19,6 @@
* under the License.
*/
-package org.apache.maven.plugin.jira;
-
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
@@ -204,8 +204,10 @@ public class RestJiraDownloader extends
private void resolveIds( WebClient client, String jiraProject )
throws IOException, MojoExecutionException, MojoFailureException
{
- resolveList( resolvedComponentIds, client, "components", component, "/rest/api/2/project/{key}/components", jiraProject );
- resolveList( resolvedFixVersionIds, client, "fixVersions", fixVersionIds, "/rest/api/2/project/{key}/versions", jiraProject );
+ resolveList( resolvedComponentIds, client, "components", component, "/rest/api/2/project/{key}/components",
+ jiraProject );
+ resolveList( resolvedFixVersionIds, client, "fixVersions", fixVersionIds, "/rest/api/2/project/{key}/versions",
+ jiraProject );
resolveList( resolvedStatusIds, client, "status", statusIds, "/rest/api/2/status" );
resolveList( resolvedResolutionIds, client, "resolution", resolutionIds, "/rest/api/2/resolution" );
resolveList( resolvedTypeIds, client, "type", typeIds, "/rest/api/2/issuetype" );
@@ -536,7 +538,8 @@ public class RestJiraDownloader extends
// if not one of the documented failures, assume that there's no rest in there in the first place.
throw new NoRest();
}
- throw new MojoExecutionException( String.format( "Authentication failure status %d.", authRes.getStatus() ) );
+ throw new MojoExecutionException( String.format( "Authentication failure status %d.",
+ authRes.getStatus() ) );
}
}
}