maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1054755 - in /maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin: jira/JiraReportGenerator.java trac/TracReportGenerator.java
Date Mon, 03 Jan 2011 21:20:33 GMT
Author: dennisl
Date: Mon Jan  3 21:20:33 2011
New Revision: 1054755

URL: http://svn.apache.org/viewvc?rev=1054755&view=rev
Log:
o Refactoring: Sort switch cases alphabetically.

Modified:
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java?rev=1054755&r1=1054754&r2=1054755&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
Mon Jan  3 21:20:33 2011
@@ -88,48 +88,48 @@ public class JiraReportGenerator
         {
             switch ( columns[columnIndex] )
             {
-                case JiraMojo.COLUMN_KEY:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.key" ) );
+                case JiraMojo.COLUMN_ASSIGNEE:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.by" ) );
                     break;
 
-                case JiraMojo.COLUMN_SUMMARY:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.summary" ) );
+                case JiraMojo.COLUMN_COMPONENT:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.component" )
);
                     break;
 
-                case JiraMojo.COLUMN_STATUS:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.status" ) );
+                case JiraMojo.COLUMN_FIX_VERSION:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.fixVersion"
) );
                     break;
 
-                case JiraMojo.COLUMN_RESOLUTION:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.resolution"
) );
+                case JiraMojo.COLUMN_KEY:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.key" ) );
                     break;
 
-                case JiraMojo.COLUMN_ASSIGNEE:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.by" ) );
+                case JiraMojo.COLUMN_PRIORITY:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.priority" )
);
                     break;
 
                 case JiraMojo.COLUMN_REPORTER:
                     sinkHeader( sink, bundle.getString( "report.issues.label.reporter" )
);
                     break;
 
-                case JiraMojo.COLUMN_TYPE:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.type" ) );
+                case JiraMojo.COLUMN_RESOLUTION:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.resolution"
) );
                     break;
 
-                case JiraMojo.COLUMN_PRIORITY:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.priority" )
);
+                case JiraMojo.COLUMN_STATUS:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.status" ) );
                     break;
 
-                case JiraMojo.COLUMN_VERSION:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.version" ) );
+                case JiraMojo.COLUMN_SUMMARY:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.summary" ) );
                     break;
 
-                case JiraMojo.COLUMN_FIX_VERSION:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.fixVersion"
) );
+                case JiraMojo.COLUMN_TYPE:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.type" ) );
                     break;
 
-                case JiraMojo.COLUMN_COMPONENT:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.component" )
);
+                case JiraMojo.COLUMN_VERSION:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.version" ) );
                     break;
 
                 default:
@@ -158,6 +158,18 @@ public class JiraReportGenerator
             {
                 switch ( columns[columnIndex] )
                 {
+                    case JiraMojo.COLUMN_ASSIGNEE:
+                        sinkCell( sink, issue.getAssignee() );
+                        break;
+
+                    case JiraMojo.COLUMN_COMPONENT:
+                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getComponents()
) );
+                        break;
+
+                    case JiraMojo.COLUMN_FIX_VERSION:
+                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getFixVersions()
) );
+                        break;
+
                     case JiraMojo.COLUMN_KEY:
                         sink.tableCell();
                         sink.link( issue.getLink() );
@@ -166,46 +178,34 @@ public class JiraReportGenerator
                         sink.tableCell_();
                         break;
 
-                    case JiraMojo.COLUMN_SUMMARY:
-                        sinkCell( sink, issue.getSummary() );
+                    case JiraMojo.COLUMN_PRIORITY:
+                        sinkCell( sink, issue.getPriority() );
                         break;
 
-                    case JiraMojo.COLUMN_STATUS:
-                        sinkCell( sink, issue.getStatus() );
+                    case JiraMojo.COLUMN_REPORTER:
+                        sinkCell( sink, issue.getReporter() );
                         break;
 
                     case JiraMojo.COLUMN_RESOLUTION:
                         sinkCell( sink, issue.getResolution() );
                         break;
 
-                    case JiraMojo.COLUMN_ASSIGNEE:
-                        sinkCell( sink, issue.getAssignee() );
+                    case JiraMojo.COLUMN_STATUS:
+                        sinkCell( sink, issue.getStatus() );
                         break;
 
-                    case JiraMojo.COLUMN_REPORTER:
-                        sinkCell( sink, issue.getReporter() );
+                    case JiraMojo.COLUMN_SUMMARY:
+                        sinkCell( sink, issue.getSummary() );
                         break;
 
                     case JiraMojo.COLUMN_TYPE:
                         sinkCell( sink, issue.getType() );
                         break;
 
-                    case JiraMojo.COLUMN_PRIORITY:
-                        sinkCell( sink, issue.getPriority() );
-                        break;
-
                     case JiraMojo.COLUMN_VERSION:
                         sinkCell( sink, issue.getVersion() );
                         break;
 
-                    case JiraMojo.COLUMN_FIX_VERSION:
-                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getFixVersions()
) );
-                        break;
-
-                    case JiraMojo.COLUMN_COMPONENT:
-                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getComponents()
) );
-                        break;
-
                     default:
                         // Do not add this column
                         break;

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java?rev=1054755&r1=1054754&r2=1054755&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
Mon Jan  3 21:20:33 2011
@@ -90,52 +90,52 @@ public class TracReportGenerator
         {
             switch ( columns[columnIndex] )
             {
-                case TracMojo.COLUMN_ID:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.id" ) );
+                case TracMojo.COLUMN_CHANGED:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.changed" ) );
                     break;
 
-                case TracMojo.COLUMN_TYPE:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.type" ) );
+                case TracMojo.COLUMN_COMPONENT:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.component" )
);
                     break;
 
-                case TracMojo.COLUMN_SUMMARY:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.summary" ) );
+                case TracMojo.COLUMN_CREATED:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.created" ) );
                     break;
 
-                case TracMojo.COLUMN_OWNER:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.owner" ) );
+                case TracMojo.COLUMN_ID:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.id" ) );
                     break;
 
-                case TracMojo.COLUMN_REPORTER:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.reporter" )
);
+                case TracMojo.COLUMN_MILESTONE:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.milestone" )
);
+                    break;
+
+                case TracMojo.COLUMN_OWNER:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.owner" ) );
                     break;
 
                 case TracMojo.COLUMN_PRIORITY:
                     sinkHeader( sink, bundle.getString( "report.issues.label.priority" )
);
                     break;
 
-                case TracMojo.COLUMN_STATUS:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.status" ) );
+                case TracMojo.COLUMN_REPORTER:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.reporter" )
);
                     break;
 
                 case TracMojo.COLUMN_RESOLUTION:
                     sinkHeader( sink, bundle.getString( "report.issues.label.resolution"
) );
                     break;
 
-                case TracMojo.COLUMN_CREATED:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.created" ) );
-                    break;
-
-                case TracMojo.COLUMN_CHANGED:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.changed" ) );
+                case TracMojo.COLUMN_STATUS:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.status" ) );
                     break;
 
-                case TracMojo.COLUMN_MILESTONE:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.milestone" )
);
+                case TracMojo.COLUMN_SUMMARY:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.summary" ) );
                     break;
 
-                case TracMojo.COLUMN_COMPONENT:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.component" )
);
+                case TracMojo.COLUMN_TYPE:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.type" ) );
                     break;
 
                 default:
@@ -166,6 +166,18 @@ public class TracReportGenerator
             {
                 switch ( columns[columnIndex] )
                 {
+                    case TracMojo.COLUMN_CHANGED:
+                        sinkCell( sink, sdf.format( issue.getUpdated() ) );
+                        break;
+
+                    case TracMojo.COLUMN_COMPONENT:
+                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getComponents()
) );
+                        break;
+
+                    case TracMojo.COLUMN_CREATED:
+                        sinkCell( sink, sdf.format( issue.getCreated() ) );
+                        break;
+
                     case TracMojo.COLUMN_ID:
                         sink.tableCell();
                         sink.link( issue.getLink() );
@@ -174,48 +186,36 @@ public class TracReportGenerator
                         sink.tableCell_();
                         break;
 
-                    case TracMojo.COLUMN_TYPE:
-                        sinkCell( sink, issue.getType() );
-                        break;
-
-                    case TracMojo.COLUMN_SUMMARY:
-                        sinkCell( sink, issue.getSummary() );
+                    case TracMojo.COLUMN_MILESTONE:
+                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getFixVersions()
) );
                         break;
 
                     case TracMojo.COLUMN_OWNER:
                         sinkCell( sink, issue.getAssignee() );
                         break;
 
-                    case TracMojo.COLUMN_REPORTER:
-                        sinkCell( sink, issue.getReporter() );
-                        break;
-
                     case TracMojo.COLUMN_PRIORITY:
                         sinkCell( sink, issue.getPriority() );
                         break;
 
-                    case TracMojo.COLUMN_STATUS:
-                        sinkCell( sink, issue.getStatus() );
+                    case TracMojo.COLUMN_REPORTER:
+                        sinkCell( sink, issue.getReporter() );
                         break;
 
                     case TracMojo.COLUMN_RESOLUTION:
                         sinkCell( sink, issue.getResolution() );
                         break;
 
-                    case TracMojo.COLUMN_CREATED:
-                        sinkCell( sink, sdf.format( issue.getCreated() ) );
-                        break;
-
-                    case TracMojo.COLUMN_CHANGED:
-                        sinkCell( sink, sdf.format( issue.getUpdated() ) );
+                    case TracMojo.COLUMN_STATUS:
+                        sinkCell( sink, issue.getStatus() );
                         break;
 
-                    case TracMojo.COLUMN_MILESTONE:
-                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getFixVersions()
) );
+                    case TracMojo.COLUMN_SUMMARY:
+                        sinkCell( sink, issue.getSummary() );
                         break;
 
-                    case TracMojo.COLUMN_COMPONENT:
-                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getComponents()
) );
+                    case TracMojo.COLUMN_TYPE:
+                        sinkCell( sink, issue.getType() );
                         break;
 
                     default:



Mime
View raw message