Index: topia/src/java/org/codelutin/topia/TopiaId.java diff -u topia/src/java/org/codelutin/topia/TopiaId.java:1.4 topia/src/java/org/codelutin/topia/TopiaId.java:1.5 --- topia/src/java/org/codelutin/topia/TopiaId.java:1.4 Fri Aug 6 18:02:38 2004 +++ topia/src/java/org/codelutin/topia/TopiaId.java Tue Jun 28 14:08:34 2005 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * - * Mise a jour: $Date: 2004/08/06 18:02:38 $ + * Mise a jour: $Date: 2005/06/28 14:08:34 $ * par : $Author: bpoussin $ */ @@ -68,6 +68,9 @@ * Cree un topiaId pour une certaine classe */ public static String create(Class clazz){ + if(!clazz.isInterface()){ + throw new IllegalArgumentException("Only interface is permit to create id: " + clazz); + } return clazz.getName() + "#" + System.currentTimeMillis() + "#" + Math.random(); }