Throwing of InvalidObjectException fixed BLD200307210100
authormmatula@netbeans.org
Thu, 17 Jul 2003 19:48:42 +0000
changeset 1312b524d01b62da
parent 1311 0f950518a3a6
child 1313 b0c7891b0b66
Throwing of InvalidObjectException fixed
mdr/src/org/netbeans/mdr/handlers/BaseObjectHandler.java
     1.1 --- a/mdr/src/org/netbeans/mdr/handlers/BaseObjectHandler.java	Thu Jul 10 23:37:11 2003 +0000
     1.2 +++ b/mdr/src/org/netbeans/mdr/handlers/BaseObjectHandler.java	Thu Jul 17 19:48:42 2003 +0000
     1.3 @@ -445,15 +445,21 @@
     1.4          }
     1.5   */
     1.6          try {
     1.7 +            StorableBaseObject result;
     1.8              if (this.storable != null)
     1.9 -                return this.storable;                   // Transient object
    1.10 +                result = this.storable;                   // Transient object
    1.11              else
    1.12 -                return mdrStorage.getObject(mofId);     // Persistent object
    1.13 +                result = mdrStorage.getObject(mofId);     // Persistent object
    1.14 +            if (result == null) {
    1.15 +                throw new InvalidObjectException(null, "Object with MOFID " + mofId + " no longer exists.");
    1.16 +            }
    1.17 +            return result;
    1.18          } catch (StorageBadRequestException e) {
    1.19              throw new InvalidObjectException(null, "Object with MOFID " + mofId + " no longer exists.");
    1.20          } catch (StorageException e) {
    1.21              throw new DebugException(e.toString());
    1.22          }
    1.23 +        
    1.24          //return storableDelegate;
    1.25      }
    1.26