r9723 - helma-ng/trunk/modules/helma/storage
[email protected] Fri, 8 May 2009 12:55:50 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090508105550.462B83D0D6@mia> |
Author: hannes
Date: 2009-05-08 12:55:50 +0200 (Fri, 08 May 2009)
New Revision: 9723
Modified:
helma-ng/trunk/modules/helma/storage/storable.js
Log:
Check if a Storable constructor exists before creating a new one.
Details at http://dev.helma.org/trac/helma/changeset/9723
Modified: helma-ng/trunk/modules/helma/storage/storable.js
===================================================================
--- helma-ng/trunk/modules/helma/storage/storable.js 2009-05-08 10:22:19 UTC (rev 9722)
+++ helma-ng/trunk/modules/helma/storage/storable.js 2009-05-08 10:55:50 UTC (rev 9723)
@@ -20,6 +20,9 @@
// if called with one argument, return a constructor for a concrete type.
if (arguments.length == 1) {
+ if (type in typeRegistry) {
+ return typeRegistry[type];
+ }
var ctor = bindArguments(Storable, type);
ctor.all = bindArguments(store.all, type);
ctor.get = bindArguments(store.get, type);