This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-rar-plugin.git
The following commit(s) were added to refs/heads/master by this push: new a51c70f Repair some problems IntelliJ noticed (#31) a51c70f is described below commit a51c70fb0039ea01a11bc4560f948c41b8a92d2e Author: Elliotte Rusty Harold <elh...@users.noreply.github.com> AuthorDate: Mon Dec 2 14:49:37 2024 +0000 Repair some problems IntelliJ noticed (#31) --- src/main/java/org/apache/maven/plugins/rar/RarMojo.java | 10 +++++----- src/site/fml/faq.fml | 12 ++++++------ src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java | 4 +--- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/rar/RarMojo.java b/src/main/java/org/apache/maven/plugins/rar/RarMojo.java index a06736e..76466aa 100644 --- a/src/main/java/org/apache/maven/plugins/rar/RarMojo.java +++ b/src/main/java/org/apache/maven/plugins/rar/RarMojo.java @@ -268,7 +268,7 @@ public class RarMojo extends AbstractMojo { protected List<RarResource> rarResources; /** - * Whether or not warn if the <code>ra.xml</code> file is missing. Set to <code>false</code> + * Whether to warn if the <code>ra.xml</code> file is missing. Set to <code>false</code> * if you want you RAR built without a <code>ra.xml</code> file. * This may be useful if you are building against JCA 1.6 or later. * @@ -304,17 +304,17 @@ public class RarMojo extends AbstractMojo { /** * The Jar archiver. */ - private JarArchiver jarArchiver; + private final JarArchiver jarArchiver; /** * @since 2.3 */ - protected MavenResourcesFiltering mavenResourcesFiltering; + protected final MavenResourcesFiltering mavenResourcesFiltering; /** * @since 2.4 */ - private MavenProjectHelper projectHelper; + private final MavenProjectHelper projectHelper; private File buildDir; @@ -465,7 +465,7 @@ public class RarMojo extends AbstractMojo { protected static File getRarFile(File basedir, String finalName, String classifier) { if (classifier == null) { classifier = ""; - } else if (classifier.trim().length() > 0 && !classifier.startsWith("-")) { + } else if (!classifier.trim().isEmpty() && !classifier.startsWith("-")) { classifier = "-" + classifier; } diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml index 26e2292..80aed78 100644 --- a/src/site/fml/faq.fml +++ b/src/site/fml/faq.fml @@ -25,16 +25,16 @@ under the License. id="FAQ" title="Frequently Asked Questions"> <part id="General"> <faq id="question"> - <question>Is the rar file generated by the maven-rar-plugin is the same with the rar file(compressed file) of WinRar?</question> + <question>Is the rar file generated by the maven-rar-plugin the same as the rar file(compressed file) of WinRar?</question> <answer> <p> No. They are entirely different from each other. </p> <p> - A Resource Adapter Archive (RAR) file is a Java archive (JAR) file used to package a resource adapter for the Java 2 Connector (J2C) Architecture + A Resource Adapter Archive (RAR) file is a Java archive (JAR) file used to package a resource adapter for the Java 2 Connector (J2C) Architecture. <br/> <br/> - A RAR file can contain the following: + An RAR file can contain the following: </p> <ul> <li>Enterprise information system (EIS) supplied resource adapter implementation code in the form of JAR files or other runnable components, such as dynamic link lists.</li> @@ -42,9 +42,9 @@ under the License. <li>Static documents, such as HTML files, images, and sound files.</li> </ul> <p> - While RAR(Roshal ARchive) is the native format of WinRAR archiver. Like other archives, RAR files - are data containers, they store one or several files in the compressed form. - After you downloaded RAR file from Internet, you need to unpack its contents in order to use it. + RAR (Roshal ARchive) is the native format of WinRAR archiver. Like other archives, RAR files + are data containers. They store one or several files in the compressed form. + After you download an RAR file from Internet, you need to unpack its contents in order to use it. </p> </answer> </faq> diff --git a/src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java b/src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java index 6801e31..2290f34 100644 --- a/src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/rar/RarMojoTest.java @@ -305,9 +305,7 @@ public class RarMojoTest extends AbstractMojoTestCase { } private int getSizeOfExpectedFiles(List<String> fileList, List<String> expectedFiles) { - for (Object aFileList : fileList) { - String fileName = (String) aFileList; - + for (String fileName : fileList) { if (expectedFiles.contains(fileName)) { expectedFiles.remove(fileName); assertFalse(expectedFiles.contains(fileName));