This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MJAVADOC-625
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git


The following commit(s) were added to refs/heads/MJAVADOC-625 by this push:
     new c0924f7  Apply review comments
c0924f7 is described below

commit c0924f7c0eeb29c0334e4f549d718817e41075b2
Author: rfscholte <[email protected]>
AuthorDate: Sat May 1 14:55:45 2021 +0200

    Apply review comments
---
 src/it/projects/MJAVADOC-625_addstylesheet/pom.xml | 56 +++++++++++-----------
 .../maven/plugins/javadoc/AbstractJavadocMojo.java | 11 +++--
 2 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/src/it/projects/MJAVADOC-625_addstylesheet/pom.xml 
b/src/it/projects/MJAVADOC-625_addstylesheet/pom.xml
index 1b96a29..fea976f 100644
--- a/src/it/projects/MJAVADOC-625_addstylesheet/pom.xml
+++ b/src/it/projects/MJAVADOC-625_addstylesheet/pom.xml
@@ -12,35 +12,35 @@
        language governing permissions and limitations under the License. -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-       <modelVersion>4.0.0</modelVersion>
-       <groupId>org.apache.maven.plugins.javadoc.it</groupId>
-       <artifactId>mjavadoc-625</artifactId>
-       <version>1.0.0-SNAPSHOT</version>
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.javadoc.it</groupId>
+  <artifactId>mjavadoc-625</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
 
-       <url>https://issues.apache.org/jira/browse/MJAVADOC-625</url>
+  <url>https://issues.apache.org/jira/browse/MJAVADOC-625</url>
 
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-compiler-plugin</artifactId>
-                               <version>3.8.0</version>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-javadoc-plugin</artifactId>
-                               <version>@project.version@</version>
-                               <configuration>
-                                       <addStylesheets>
-                        
<addStylesheet>resources/addstylesheet.css</addStylesheet>
-                                               
<addStylesheet>resources/addstylesheets1.css</addStylesheet>
-                                               
<addStylesheet>resources/addstylesheets2.css</addStylesheet>
-                                       </addStylesheets>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.8.0</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <addStylesheets>
+            <addStylesheet>resources/addstylesheet.css</addStylesheet>
+            <addStylesheet>resources/addstylesheets1.css</addStylesheet>
+            <addStylesheet>resources/addstylesheets2.css</addStylesheet>
+          </addStylesheets>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 
 </project>
diff --git 
a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java 
b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index 26a5a48..24d008e 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -5550,14 +5550,15 @@ public abstract class AbstractJavadocMojo
         addArgIfNotEmpty( arguments, "-stylesheetfile",
                           JavadocUtil.quotedPathArgument( getStylesheetFile( 
javadocOutputDirectory ) ) );
         
-        if ( addStylesheets != null && addStylesheets.length != 0 )
+        if ( addStylesheets != null )
         {
-            for ( String as : addStylesheets )
-            {
+            for ( String addStylesheet : addStylesheets )
+            {
                 addArgIfNotEmpty( arguments, "--add-stylesheet",
-                                  JavadocUtil.quotedPathArgument( 
getAddStylesheet( javadocOutputDirectory, as ) ),
+                                  JavadocUtil.quotedPathArgument( 
getAddStylesheet( javadocOutputDirectory,
+                                                                               
     addStylesheet ) ),
                                   JavaVersion.parse( "10" ) );
-            }
+            }
         }
 
         if ( StringUtils.isNotEmpty( sourcepath ) && !isJavaDocVersionAtLeast( 
SINCE_JAVADOC_1_5 ) )

Reply via email to