You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2018/10/26 10:40:09 UTC

[maven-jarsigner-plugin] branch MJARSIGNER-56 created (now 7f73fcd)

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

rfscholte pushed a change to branch MJARSIGNER-56
in repository https://gitbox.apache.org/repos/asf/maven-jarsigner-plugin.git.


      at 7f73fcd  [MJARSIGNER-56] Require Java 7

This branch includes the following new commits:

     new 7f73fcd  [MJARSIGNER-56] Require Java 7

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-jarsigner-plugin] 01/01: [MJARSIGNER-56] Require Java 7

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MJARSIGNER-56
in repository https://gitbox.apache.org/repos/asf/maven-jarsigner-plugin.git

commit 7f73fcd74552290b4b9cf66d690660819c09f887
Author: rfscholte <rf...@apache.org>
AuthorDate: Fri Oct 26 12:40:06 2018 +0200

    [MJARSIGNER-56] Require Java 7
---
 pom.xml                                                        |  1 +
 .../apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java  | 10 ++++------
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/pom.xml b/pom.xml
index ba6b27b..ce12704 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,6 +72,7 @@ under the License.
 
   <properties>
     <mavenVersion>3.0</mavenVersion>
+    <javaVersion>7</javaVersion>
   </properties>
 
   <dependencies>
diff --git a/src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java b/src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java
index 69581d0..828bb2f 100644
--- a/src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java
@@ -292,22 +292,20 @@ public abstract class AbstractJarsignerMojo
 
                 if ( processAttachedArtifacts && !Boolean.FALSE.equals( attachments ) )
                 {
-                    Collection<String> includes = new HashSet<String>();
+                    Collection<String> includes = new HashSet<>();
                     if ( includeClassifiers != null )
                     {
                         includes.addAll( Arrays.asList( includeClassifiers ) );
                     }
 
-                    Collection<String> excludes = new HashSet<String>();
+                    Collection<String> excludes = new HashSet<>();
                     if ( excludeClassifiers != null )
                     {
                         excludes.addAll( Arrays.asList( excludeClassifiers ) );
                     }
 
-                    for ( Object o : this.project.getAttachedArtifacts() )
+                    for ( Artifact artifact : this.project.getAttachedArtifacts() )
                     {
-                        final Artifact artifact = (Artifact) o;
-
                         if ( !includes.isEmpty() && !includes.contains( artifact.getClassifier() ) )
                         {
                             continue;
@@ -510,7 +508,7 @@ public abstract class AbstractJarsignerMojo
         request.setProtectedAuthenticationPath( protectedAuthenticationPath );
 
         // Preserves 'file.encoding' the plugin is executed with.
-        final List<String> additionalArguments = new ArrayList<String>();
+        final List<String> additionalArguments = new ArrayList<>();
 
         boolean fileEncodingSeen = false;