Update of /var/cvs/src/org/mmbase/module/corebuilders
In directory james.mmbase.org:/tmp/cvs-serv30691
Modified Files:
TypeRel.java
Log Message:
some checking of arguments and state
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/corebuilders
Index: TypeRel.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/corebuilders/TypeRel.java,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- TypeRel.java 21 Oct 2008 17:24:07 -0000 1.81
+++ TypeRel.java 24 Nov 2008 15:28:42 -0000 1.82
@@ -37,7 +37,7 @@
* @author Daniel Ockeloen
* @author Pierre van Rooden
* @author Michiel Meeuwissen
- * @version $Id: TypeRel.java,v 1.81 2008/10/21 17:24:07 michiel Exp $
+ * @version $Id: TypeRel.java,v 1.82 2008/11/24 15:28:42 michiel Exp $
* @see RelDef
* @see InsRel
* @see org.mmbase.module.core.MMBase
@@ -129,13 +129,17 @@
*/
protected TypeRelSet addCacheEntry(MMObjectNode typeRel, boolean
buildersInitialized) {
+ if (typeRel == null) throw new IllegalArgumentException("typeRel
cannot be null");
+
TypeRelSet added = new TypeRelSet(); // store temporary, which will
enable nice logging of what happened
// Start to add the actual definition, this is then afterwards again,
// except if one of the builders could not be found
added.add(typeRel);
+ if (mmb == null) throw new IllegalStateException("mmb is null");
RelDef reldef = mmb.getRelDef();
+ if (reldef == null) throw new IllegalStateException("No reldef found");
MMObjectNode reldefNode =
reldef.getNode(typeRel.getIntValue("rnumber"));
if (reldefNode == null) { throw new RuntimeException("Could not find
reldef-node for rnumber= "
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs