From c9cd0260a5dbb0043f26110b889790a00cfc1524 Mon Sep 17 00:00:00 2001
From: david_williams <david_williams>
Date: Mon, 23 Feb 2009 18:12:23 +0000
Subject: [PATCH] check for no zip file

---
 .../tools/UpdatePackPropertiesFile.java       | 30 ++++++++++---------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/UpdatePackPropertiesFile.java b/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/UpdatePackPropertiesFile.java
index 2cfec3a0b..d04d526cd 100644
--- a/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/UpdatePackPropertiesFile.java
+++ b/plugins/org.eclipse.wtp.releng.tools/src/org/eclipse/wtp/releng/tools/UpdatePackPropertiesFile.java
@@ -121,11 +121,11 @@ public class UpdatePackPropertiesFile extends Task {
 		// we avoid some recursing since we know structure, and know jars we
 		// want to examine
 		File featureDestDir = new File(destinationdirectory + "eclipse/features/");
-		String[] jars = featureDestDir.list(jarFileFilter);
+		String[] featurejars = featureDestDir.list(jarFileFilter);
 		File bundlesDestDir = new File(destinationdirectory + "eclipse/plugins/");
 		String[] bundlejars = bundlesDestDir.list(jarFileFilter);
 
-		result = checkIfJarsSigned(result, destinationdirectory, "eclipse/features/", jars);
+		result = checkIfJarsSigned(result, destinationdirectory, "eclipse/features/", featurejars);
 		result = checkIfJarsSigned(result, destinationdirectory, "eclipse/plugins/", bundlejars);
 		if (result != null && result.length() > 0 && result.endsWith(",")) {
 			result = result.substring(0, result.length() - 1);
@@ -263,18 +263,20 @@ public class UpdatePackPropertiesFile extends Task {
 	}
 
 	private String checkIfJarsSigned(String currentresults, String destinationDir, String parentDir, String[] jars) throws IOException {
-		for (int i = 0; i < jars.length; i++) {
-			String jarname = jars[i];
-			JarFile jarFile = new JarFile(destinationDir + parentDir + jarname);
-			Enumeration jarentries = jarFile.entries();
-			while (jarentries.hasMoreElements()) {
-				JarEntry jarentry = (JarEntry) jarentries.nextElement();
-				String entryname = jarentry.getName();
-				log(entryname, Project.MSG_DEBUG);
-				if (entryname.endsWith("ECLIPSE.SF") || entryname.endsWith("ECLIPSEF.SF")) {
-					// log(parentDir + jarname);
-					currentresults = currentresults + (parentDir + jarname) + ",";
-					break;
+		if (jars != null) {
+			for (int i = 0; i < jars.length; i++) {
+				String jarname = jars[i];
+				JarFile jarFile = new JarFile(destinationDir + parentDir + jarname);
+				Enumeration jarentries = jarFile.entries();
+				while (jarentries.hasMoreElements()) {
+					JarEntry jarentry = (JarEntry) jarentries.nextElement();
+					String entryname = jarentry.getName();
+					log(entryname, Project.MSG_DEBUG);
+					if (entryname.endsWith("ECLIPSE.SF") || entryname.endsWith("ECLIPSEF.SF")) {
+						// log(parentDir + jarname);
+						currentresults = currentresults + (parentDir + jarname) + ",";
+						break;
+					}
 				}
 			}
 		}
-- 
GitLab