[hg] main-silver: correct public package processing, take 2

  • From: Milos Kleint < >
  • To: ,
  • Subject: [hg] main-silver: correct public package processing, take 2
  • Date: Fri, 01 Feb 2013 13:38:01 -0800

changeset 56617332d6c7 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/56617332d6c7
description:
        correct public package processing, take 2

diffstat:

 
maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
 |  11 +++++++--
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff --git 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
--- 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
+++ 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenWhiteListQueryImpl.java
@@ -455,20 +455,25 @@
 
         public NBMWrapper(Artifact art, Set<String> allPackages, String[] 
publicPackages, String[] friends, String[] mavenCP) {
             super(art, allPackages);
-            this.publicPackages = publicPackages;
             this.friends = friends != null ? Arrays.asList(friends) : 
Collections.<String>emptyList();
             this.mavenCP = mavenCP != null ? Arrays.asList(mavenCP) : 
Collections.<String>emptyList();
+            Set<String> packs = new HashSet<String>();
             if (publicPackages == null) {
                 //no public packages.
             } else {
                 for (String pub : publicPackages) {
+                    pub = pub.trim();
+                    packs.add(pub);
                     if (pub.endsWith(".**")) {
-                        subPublic.add(pub.substring(0, pub.length() - 
".**".length()));
+                        String sub = pub.substring(0, pub.length() - 
".**".length());
+                        subPublic.add(sub);
                     } else if (pub.endsWith(".*")) {
-                        eqPublic.add(pub.substring(0, pub.length() - 
".*".length()));
+                        String eq = pub.substring(0, pub.length() - 
".*".length());
+                        eqPublic.add(eq);
                     }
                 }
             }
+            this.publicPackages = packs.toArray(new String[0]);
         }
 
         boolean isFriend(String codenamebase) {

[hg] main-silver: correct public package processing, take 2

Milos Kleint 02/01/2013

Project Features

About this Project

APIsupport was started in November 2009, is owned by Antonin Nebuzelsky, and has 43 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close