]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/admin/support/FindDomainForm.java
add: show verification status of email address for support
[gigi.git] / src / org / cacert / gigi / pages / admin / support / FindDomainForm.java
index f40855141921e8aab6cd68c66adb8ec2ac56509a..93c4b0c158bfffe0eb00f14b2afaac09bac1f0a8 100644 (file)
@@ -10,16 +10,14 @@ import org.cacert.gigi.dbObjects.CertificateOwner;
 import org.cacert.gigi.dbObjects.Domain;
 import org.cacert.gigi.localisation.Language;
 import org.cacert.gigi.output.template.Form;
+import org.cacert.gigi.output.template.SprintfCommand;
 import org.cacert.gigi.output.template.Template;
 
 public class FindDomainForm extends Form {
 
     private CertificateOwner res = null;
 
-    private static Template t;
-    static {
-        t = new Template(FindDomainForm.class.getResource("FindDomainForm.templ"));
-    }
+    private static final Template t = new Template(FindDomainForm.class.getResource("FindDomainForm.templ"));
 
     public FindDomainForm(HttpServletRequest hsr) {
         super(hsr);
@@ -33,13 +31,13 @@ public class FindDomainForm extends Form {
             try {
                 d = Domain.getById(Integer.parseInt(request.substring(1)));
             } catch (IllegalArgumentException e) {
-                throw (new GigiApiException("No personal domains found matching the id " + request.substring(1) + "."));
+                throw new GigiApiException(SprintfCommand.createSimple("No personal domains found matching the id {0}", request.substring(1)));
             }
         } else {
             d = Domain.searchUserIdByDomain(request);
         }
         if (d == null) {
-            throw (new GigiApiException("No personal domains found matching " + request));
+            throw new GigiApiException(SprintfCommand.createSimple("No personal domains found matching {0}", request));
         }
         res = d.getOwner();
         return true;