X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Futil%2FNotary.java;h=144bf6d88a464a0ffa9a8367dc6435992b06b1fb;hb=36734cfd05e1a80c798485496bb2bdf31aacdfce;hp=7cb15aad203dc14619143dfd442b238221c28b62;hpb=07f74d10bddc819f4524e2e0c1a2815eb4e7ec79;p=gigi.git diff --git a/src/org/cacert/gigi/util/Notary.java b/src/org/cacert/gigi/util/Notary.java index 7cb15aad..144bf6d8 100644 --- a/src/org/cacert/gigi/util/Notary.java +++ b/src/org/cacert/gigi/util/Notary.java @@ -1,6 +1,7 @@ package org.cacert.gigi.util; import java.text.ParseException; +import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; @@ -13,6 +14,7 @@ import org.cacert.gigi.dbObjects.Group; import org.cacert.gigi.dbObjects.Name; import org.cacert.gigi.dbObjects.User; import org.cacert.gigi.output.DateSelector; +import org.cacert.gigi.output.template.SprintfCommand; public class Notary { @@ -72,7 +74,7 @@ public class Notary { * @throws GigiApiException * if the assurance fails (for various reasons) */ - public synchronized static void assure(User assurer, User assuree, Name assureeName, Date dob, int awarded, String location, String date, AssuranceType type) throws GigiApiException { + public synchronized static void assure(User assurer, User assuree, Name assureeName, DayDate dob, int awarded, String location, String date, AssuranceType type) throws GigiApiException { may(assurer, assuree, AssuranceType.FACE_TO_FACE); GigiApiException gae = new GigiApiException(); if ( !gae.isEmpty()) { @@ -135,7 +137,7 @@ public class Notary { } else if (type == AssuranceType.TTP_ASSISTED) { assureTTP(assurer, assuree, awarded, location, date); } else { - throw new GigiApiException("Unknown Assurance type: " + type); + throw new GigiApiException(new SprintfCommand("Unknown Assurance type: %s", Arrays.asList(type.toString()))); } assurer.invalidateMadeAssurances(); assuree.invalidateReceivedAssurances();