From 0c4bb5b7d4e0e5bb513496432d04189b9b297275 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 15 Mar 2005 10:43:15 +0000 Subject: [PATCH] Fix NullPointerException for prototype folders with non-valid type names --- src/helma/framework/core/TypeManager.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/helma/framework/core/TypeManager.java b/src/helma/framework/core/TypeManager.java index 4684aff0..eafb1b70 100644 --- a/src/helma/framework/core/TypeManager.java +++ b/src/helma/framework/core/TypeManager.java @@ -134,9 +134,10 @@ public final class TypeManager { Prototype proto = getPrototype(name); // if prototype doesn't exist, create it - if ((proto == null) && isValidTypeName(name)) { - // create new prototype - createPrototype(name, (Repository) list[i]); + if (proto == null) { + // create new prototype if type name is valid + if (isValidTypeName(name)) + createPrototype(name, (Repository) list[i]); } else { proto.addRepository((Repository) list[i]); }