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);
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;