]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/Domain.java
inopiae-dob: replaced some magic numbers by constants
[gigi.git] / src / org / cacert / gigi / dbObjects / Domain.java
index 19594d7d3678d95ef94f6250231f7a76cd28cd0d..5876530355a8f9d5be1c37aa20f588e40ff37ca2 100644 (file)
@@ -73,7 +73,7 @@ public class Domain implements IdCachable, Verifyable {
         if ( !s.equals(publicSuffix)) {
             throw new GigiApiException("You may only register a domain with exactly one lable before the public suffix.");
         }
-        if (("." + s).matches("(.[0-9]*)*")) {
+        if (("." + s).matches("(\\.[0-9]*)*")) {
             // This is not reached because we currently have no TLD that is
             // numbers only. But who knows..
             // Better safe than sorry.
@@ -129,7 +129,7 @@ public class Domain implements IdCachable, Verifyable {
             boolean existed = rs.next();
             rs.close();
             if (existed) {
-                throw new GigiApiException("Domain could not be inserted. Domain is already valid.");
+                throw new GigiApiException("Domain could not be inserted. Domain is already known to the system.");
             }
         }
     }