Merging fix for #6175 into default branch
authorJaroslav Tulach <jtulach@netbeans.org>
Mon, 14 Jul 2014 17:31:20 +0200
changeset 7290f8827288b31
parent 727 66f03ad8f00f
parent 728 90fc6f6e508b
child 730 ef743bfe7561
Merging fix for #6175 into default branch
     1.1 --- a/html4j-maven-plugin/src/main/java/org/netbeans/html/mojo/ProcessJsAnnotationsMojo.java	Sun Jul 13 23:50:25 2014 +0200
     1.2 +++ b/html4j-maven-plugin/src/main/java/org/netbeans/html/mojo/ProcessJsAnnotationsMojo.java	Mon Jul 14 17:31:20 2014 +0200
     1.3 @@ -56,6 +56,7 @@
     1.4  import java.net.URL;
     1.5  import java.net.URLClassLoader;
     1.6  import java.util.ArrayList;
     1.7 +import java.util.LinkedList;
     1.8  import java.util.List;
     1.9  import org.apache.maven.artifact.Artifact;
    1.10  import org.apache.maven.plugin.AbstractMojo;
    1.11 @@ -86,7 +87,7 @@
    1.12  
    1.13      @Override
    1.14      public void execute() throws MojoExecutionException, MojoFailureException {
    1.15 -        List<URL> arr = new ArrayList<URL>();
    1.16 +        LinkedList<URL> arr = new LinkedList<URL>();
    1.17          boolean foundAsm = false;
    1.18          for (Artifact a : prj.getArtifacts()) {
    1.19              final File f = a.getFile();
    1.20 @@ -103,7 +104,7 @@
    1.21          }
    1.22          if (!foundAsm) {
    1.23              URL loc = ClassReader.class.getProtectionDomain().getCodeSource().getLocation();
    1.24 -            arr.add(loc);
    1.25 +            arr.addFirst(loc);
    1.26          }
    1.27          URLClassLoader l = new URLClassLoader(arr.toArray(new URL[arr.size()]));
    1.28          try {