]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/admin/support/FindDomainForm.java
Merge changes I6dffa325,I086b1c28
[gigi.git] / src / org / cacert / gigi / pages / admin / support / FindDomainForm.java
index aafd5b9d6ef807f652534859d72cbaa83bfc815f..93c4b0c158bfffe0eb00f14b2afaac09bac1f0a8 100644 (file)
@@ -1,7 +1,6 @@
 package org.cacert.gigi.pages.admin.support;
 
 import java.io.PrintWriter;
-import java.util.Arrays;
 import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
@@ -18,10 +17,7 @@ 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);
@@ -35,13 +31,13 @@ public class FindDomainForm extends Form {
             try {
                 d = Domain.getById(Integer.parseInt(request.substring(1)));
             } catch (IllegalArgumentException e) {
-                throw (new GigiApiException(new SprintfCommand("No personal domains found matching the id %s", Arrays.asList(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(new SprintfCommand("No personal domains found matching %s", Arrays.asList(request))));
+            throw new GigiApiException(SprintfCommand.createSimple("No personal domains found matching {0}", request));
         }
         res = d.getOwner();
         return true;