You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/08/31 17:49:52 UTC

[GitHub] matthiasblaesing closed pull request #820: use 'modules' instead of property 'nb.clusters.list' to construct list of modules

matthiasblaesing closed pull request #820: use 'modules' instead of property 'nb.clusters.list' to construct list of modules
URL: https://github.com/apache/incubator-netbeans/pull/820
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/CreateLicenseSummary.java b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/CreateLicenseSummary.java
index 22884369dc..c8f415180a 100644
--- a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/CreateLicenseSummary.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/CreateLicenseSummary.java
@@ -369,51 +369,49 @@ private String getMaybeMissing(Map<String, String> headers, String headerName) {
 
     private Map<Long, Map<String, String>> findCrc2LicenseHeaderMapping() throws IOException {
         Map<Long, Map<String, String>> crc2LicenseHeaders = new HashMap<>();
-        for (String cluster : getProject().getProperty("nb.clusters.list").split("[, ]+")) {
-            for (String module : getProject().getProperty(cluster).split("[, ]+")) {
-                File d = new File(new File(nball, module), "external");
-                Set<String> hgFiles = VerifyLibsAndLicenses.findHgControlledFiles(d);
-                Map<String, Map<String, String>> binary2License = findBinary2LicenseHeaderMapping(hgFiles, d);
-                for (String n : hgFiles) {
-                    if (!n.endsWith(".jar") && !n.endsWith(".zip") && !n.endsWith(".xml")
-                            && !n.endsWith(".js") && !n.endsWith(".dylib")) {
-                        continue;
-                    }
-                    Map<String, String> headers = binary2License.get(n);
-                    if (headers == null) {
-                        continue;
-                    }
-                    File f = new File(d, n);
-                    InputStream is = new FileInputStream(f);
-                    try {
-                        crc2LicenseHeaders.put(computeCRC32(is), headers);
-                    } finally {
-                        is.close();
-                    }
-                    if (!n.endsWith(".jar") && !n.endsWith(".zip")) {
-                        continue;
-                    }
-                    ZipFile zf = new ZipFile(f);
-                    try {
-                        Enumeration<? extends ZipEntry> entries = zf.entries();
-                        while (entries.hasMoreElements()) {
-                            ZipEntry entry = entries.nextElement();
-                            String innerName = entry.getName();
-                            if (!innerName.endsWith(".jar") && !innerName.endsWith(".zip")) {
-                                continue;
-                            }
-                            Map<String, String> nestedHeaders = binary2License.get(n + "!/" + innerName);
-                            if (nestedHeaders == null) nestedHeaders = headers;
-                            is = zf.getInputStream(entry);
-                            try {
-                                crc2LicenseHeaders.put(computeCRC32(is), nestedHeaders);
-                            } finally {
-                                is.close();
-                            }
+        for (String module : modules) {
+            File d = new File(new File(nball, module), "external");
+            Set<String> hgFiles = VerifyLibsAndLicenses.findHgControlledFiles(d);
+            Map<String, Map<String, String>> binary2License = findBinary2LicenseHeaderMapping(hgFiles, d);
+            for (String n : hgFiles) {
+                if (!n.endsWith(".jar") && !n.endsWith(".zip") && !n.endsWith(".xml")
+                        && !n.endsWith(".js") && !n.endsWith(".dylib")) {
+                    continue;
+                }
+                Map<String, String> headers = binary2License.get(n);
+                if (headers == null) {
+                    continue;
+                }
+                File f = new File(d, n);
+                InputStream is = new FileInputStream(f);
+                try {
+                    crc2LicenseHeaders.put(computeCRC32(is), headers);
+                } finally {
+                    is.close();
+                }
+                if (!n.endsWith(".jar") && !n.endsWith(".zip")) {
+                    continue;
+                }
+                ZipFile zf = new ZipFile(f);
+                try {
+                    Enumeration<? extends ZipEntry> entries = zf.entries();
+                    while (entries.hasMoreElements()) {
+                        ZipEntry entry = entries.nextElement();
+                        String innerName = entry.getName();
+                        if (!innerName.endsWith(".jar") && !innerName.endsWith(".zip")) {
+                            continue;
+                        }
+                        Map<String, String> nestedHeaders = binary2License.get(n + "!/" + innerName);
+                        if (nestedHeaders == null) nestedHeaders = headers;
+                        is = zf.getInputStream(entry);
+                        try {
+                            crc2LicenseHeaders.put(computeCRC32(is), nestedHeaders);
+                        } finally {
+                            is.close();
                         }
-                    } finally {
-                        zf.close();
                     }
+                } finally {
+                    zf.close();
                 }
             }
         }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists