From 4274141d510353f4f8b6b76965d8e7fbd1467456 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 9 Mar 2009 14:58:22 +0100 Subject: [PATCH] Add validation. --- src/net/pterodactylus/arachne/core/Site.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net/pterodactylus/arachne/core/Site.java b/src/net/pterodactylus/arachne/core/Site.java index bcefb45..86f1fe1 100644 --- a/src/net/pterodactylus/arachne/core/Site.java +++ b/src/net/pterodactylus/arachne/core/Site.java @@ -3,6 +3,8 @@ */ package net.pterodactylus.arachne.core; +import de.ina.util.validation.Validation; + /** * Container for a freenet site. A freenet site consists of the routing and * decryption keys and the basename, without the edition. @@ -26,6 +28,7 @@ public class Site { * The basename of the site */ public Site(String key, String basename) { + Validation.begin().isNotNull("key", (Object) key).isNotNull("basename", (Object) basename).check(); this.key = key; this.basename = basename; } -- 2.7.4