]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/CertificateProfile.java
Highlight expired nucleus bonus verifications in points overview
[gigi.git] / src / org / cacert / gigi / dbObjects / CertificateProfile.java
index 5704497986388f70123d5bf7230839bed85fde0d..afcc019c417b172308d5092921df3e020e7879c5 100644 (file)
@@ -180,7 +180,13 @@ public class CertificateProfile implements IdCachable {
         final HashMap<String, CertificateProfile> myName = new HashMap<String, CertificateProfile>();
         final HashMap<Integer, CertificateProfile> myId = new HashMap<Integer, CertificateProfile>();
 
-        for (File f : new File("config/profiles").listFiles()) {
+        File profiledir = new File("config/profiles");
+        File[] profilelist = profiledir.listFiles();
+        if (null == profilelist) {
+            throw new Error("Unable to list available profiles from " + profiledir.getName());
+        }
+
+        for (File f : profilelist) {
             Properties p = new Properties();
             try (FileInputStream inStream = new FileInputStream(f)) {
                 p.load(inStream);