]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/User.java
fix: #112 use term “country”, not “state”
[gigi.git] / src / org / cacert / gigi / dbObjects / User.java
index e72908be0f0b27fcddacbe45f1fc258c95d0a9ef..b4bfcc1cece2bea5b14f21505256b7dbd68c9e95 100644 (file)
@@ -68,22 +68,15 @@ public class User extends CertificateOwner {
 
     private Country residenceCountry;
 
-    protected User(GigiResultSet rs) {
+    protected User(GigiResultSet rs) throws GigiApiException {
         super(rs.getInt("id"));
-        updateName(rs);
-    }
 
-    private void updateName(GigiResultSet rs) {
         dob = new DayDate(rs.getDate("dob"));
         email = rs.getString("email");
         preferredName = Name.getById(rs.getInt("preferredName"));
 
-        try {
-            if (rs.getString("Country") != null) {
-                residenceCountry = Country.getCountryByCode(rs.getString("Country"), Country.CountryCodeType.CODE_2_CHARS);
-            }
-        } catch (GigiApiException e) {
-            throw new Error(e);
+        if (rs.getString("country") != null) {
+            residenceCountry = Country.getCountryByCode(rs.getString("Country"), Country.CountryCodeType.CODE_2_CHARS);
         }
 
         String localeStr = rs.getString("language");