diff options
Diffstat (limited to 'js/src/Ice/ObjectAdapterI.js')
-rw-r--r-- | js/src/Ice/ObjectAdapterI.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/js/src/Ice/ObjectAdapterI.js b/js/src/Ice/ObjectAdapterI.js index 9bed2f5721a..c4f2022d68f 100644 --- a/js/src/Ice/ObjectAdapterI.js +++ b/js/src/Ice/ObjectAdapterI.js @@ -313,6 +313,7 @@ { this.checkForDeactivation(); this.checkIdentity(ident); + this.checkServant(object); // // Create a copy of the Identity argument, in case the caller @@ -334,6 +335,7 @@ }, addDefaultServant: function(servant, category) { + this.checkServant(servant); this.checkForDeactivation(); this._servantManager.addDefaultServant(servant, category); @@ -493,9 +495,7 @@ { if(ident.name === undefined || ident.name === null || ident.name.length === 0) { - var e = new Ice.IllegalIdentityException(); - e.id = ident.clone(); - throw e; + throw new Ice.IllegalIdentityException(ident); } if(ident.category === undefined || ident.category === null) @@ -503,6 +503,13 @@ ident.category = ""; } }, + checkServant: function(servant) + { + if(servant === undefined || servant === null) + { + throw new Ice.IllegalServantException("cannot add null servant to Object Adapter"); + } + }, filterProperties: function(unknownProps) { // |