X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Fadmin%2Fsupport%2FFindDomainForm.java;h=93c4b0c158bfffe0eb00f14b2afaac09bac1f0a8;hb=40ac8e40f03b0ae8db51ba89ea476de114bdde41;hp=aafd5b9d6ef807f652534859d72cbaa83bfc815f;hpb=0a3573572ed9f1838d6c937b209f85111d2c4f5c;p=gigi.git diff --git a/src/org/cacert/gigi/pages/admin/support/FindDomainForm.java b/src/org/cacert/gigi/pages/admin/support/FindDomainForm.java index aafd5b9d..93c4b0c1 100644 --- a/src/org/cacert/gigi/pages/admin/support/FindDomainForm.java +++ b/src/org/cacert/gigi/pages/admin/support/FindDomainForm.java @@ -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;