maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1420408 - /maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
Date Tue, 11 Dec 2012 21:06:39 GMT
Author: rfscholte
Date: Tue Dec 11 21:06:38 2012
New Revision: 1420408

URL: http://svn.apache.org/viewvc?rev=1420408&view=rev
Log:
code format
donĀ“t hide a field

Modified:
    maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java

Modified: maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java?rev=1420408&r1=1420407&r2=1420408&view=diff
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
(original)
+++ maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
Tue Dec 11 21:06:38 2012
@@ -155,24 +155,24 @@ public abstract class AbstractReleaseMoj
         List<String> profileIds = getActiveProfileIds();
         String additionalProfiles = getAdditionalProfiles();
 
-        String arguments = this.arguments;
+        String args = this.arguments;
         if ( !profileIds.isEmpty() || StringUtils.isNotBlank( additionalProfiles ) )
         {
-            if ( !StringUtils.isEmpty( arguments ) )
+            if ( !StringUtils.isEmpty( args ) )
             {
-                arguments += " -P ";
+                args += " -P ";
             }
             else
             {
-                arguments = "-P ";
+                args = "-P ";
             }
 
             for ( Iterator<String> it = profileIds.iterator(); it.hasNext(); )
             {
-                arguments += it.next();
+                args += it.next();
                 if ( it.hasNext() )
                 {
-                    arguments += ",";
+                    args += ",";
                 }
             }
             
@@ -180,12 +180,12 @@ public abstract class AbstractReleaseMoj
             {
                 if ( !profileIds.isEmpty() )
                 {
-                    arguments += ",";
+                    args += ",";
                 }
-                arguments += additionalProfiles;
+                args += additionalProfiles;
             }
         }
-        descriptor.setAdditionalArguments( arguments );
+        descriptor.setAdditionalArguments( args );
 
         return descriptor;
     }
@@ -198,14 +198,15 @@ public abstract class AbstractReleaseMoj
     private List<String> getActiveProfileIds()
     {
         List<String> profiles;
-        try 
+        try
         {
+            // Try to use M3-methods
             Method getRequestMethod = this.session.getClass().getMethod( "getRequest" );
             Object mavenExecutionRequest = getRequestMethod.invoke( this.session );
             Method getActiveProfilesMethod = mavenExecutionRequest.getClass().getMethod(
"getActiveProfiles" );
-            profiles = ( List<String> ) getActiveProfilesMethod.invoke( mavenExecutionRequest
);
+            profiles = (List<String>) getActiveProfilesMethod.invoke( mavenExecutionRequest
);
         }
-        catch( Exception e )
+        catch ( Exception e )
         {
             if ( project.getActiveProfiles() == null || project.getActiveProfiles().isEmpty()
)
             {



Mime
View raw message